| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
LibP2P.Protocol.GossipSub.IDontWant
Description
GossipSub v1.2 IDONTWANT processing and bounded suppression state.
Synopsis
- announceIDontWant :: GossipSubRouter -> PeerId -> PubSubMessage -> IO ()
- handleIDontWant :: GossipSubRouter -> PeerId -> [IDontWant] -> IO ()
- peerRejectsMessage :: Map PeerId (Map ByteString Int) -> PeerId -> MessageId -> Bool
- filterAllowedPeers :: Map PeerId (Map ByteString Int) -> MessageId -> Set PeerId -> Set PeerId
- expireIDontWantState :: GossipSubRouter -> IO ()
Documentation
announceIDontWant :: GossipSubRouter -> PeerId -> PubSubMessage -> IO () Source #
Immediately tell v1.2 mesh peers not to send a duplicate large message. The propagation source is excluded and older protocol versions never receive the v1.2 control field.
handleIDontWant :: GossipSubRouter -> PeerId -> [IDontWant] -> IO () Source #
Record bounded IDONTWANT state received from a peer.
peerRejectsMessage :: Map PeerId (Map ByteString Int) -> PeerId -> MessageId -> Bool Source #
Test whether a peer has rejected a message ID that is still live.
filterAllowedPeers :: Map PeerId (Map ByteString Int) -> MessageId -> Set PeerId -> Set PeerId Source #
Remove peers that have rejected the message ID from a target set.
expireIDontWantState :: GossipSubRouter -> IO () Source #
Reset the per-heartbeat receive budget and age suppression entries.