Skip to content
  • Max Inden's avatar
    client/network-gossip/bridge: Use bounded channel (#5748) · 6c5db7c3
    Max Inden authored
    * client/network-gossip/bridge: Use bounded channel
    
    Instead of returning an unbounded channel on
    `GossipEngine::messages_for` return a bounded channel. For now the
    channel length is determined by the amount of past messages cached in
    the `ConsensusGossip`.
    
    With a bounded channel, one can't just fire-and-forget style send into
    it, but has to first check whether the channel is ready. Thus this
    commit restructures `GossipEngine::poll` and introduces a
    `ForwardingState` into `GossipEngine`.
    
    * client/network-gossip/bridge: Add quickcheck for different size channels
    6c5db7c3