lighthouse/beacon_node/eth2-libp2p/tests
Maximilian Ehlers ac2ff01d1e
Adds counter of received chunks to an OutboundSubstream. Ends the str… (#1126)
* Adds counter of received chunks to an OutboundSubstream. Ends the stream when the counter reaches the desired amount of chunks that where specified in a Request.

* Keeps track of remaining chunks for a stream, rather than expected ones and calculating the remainder on each received chunk

* WIP test, waiting for stable-futures to land in master

* Improve calculation for remaining chunks in response handler. Improve initial calculation for expected chunks in outbount substream

* Remove rebase artifact

* Fix compiler errors after rebasing on master

* Clone request to allow two accesses to it that move it when determining the amount of expected responses

* Correctly terminate the stream when all chunks have been received

* WIP: test that stream is terminated correctly

* Terminate stream with a termination response. Handle further received chunks in OutboundStream::Closing branch to return errors

* Remove request clone

* Report stream timeouts when closing

* Update rpc test

* Fix BlocksByRoot RPC test to request as many chunks as responses are expected

* Adds test for correctly termined BlocksByRoot rpc stream when all chunks have been received

Co-authored-by: Age Manning <Age@AgeManning.com>
2020-05-18 21:41:01 +10:00
..
common Stable futures (#879) 2020-05-17 11:16:48 +00:00
gossipsub_tests.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
noise.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
rpc_tests.rs Adds counter of received chunks to an OutboundSubstream. Ends the str… (#1126) 2020-05-18 21:41:01 +10:00