Unverified Commit 6c5db7c3 authored by Max Inden's avatar Max Inden Committed by GitHub
Browse files

client/network-gossip/bridge: Use bounded channel (#5748)

* 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
parent 80e4417f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment