lighthouse/beacon_node/eth2-libp2p/src
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
..
discovery Stable futures (#879) 2020-05-17 11:16:48 +00:00
peer_manager Client identification (#1158) 2020-05-18 21:35:14 +10:00
rpc Adds counter of received chunks to an OutboundSubstream. Ends the str… (#1126) 2020-05-18 21:41:01 +10:00
types Client identification (#1158) 2020-05-18 21:35:14 +10:00
behaviour.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
config.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
lib.rs Stable futures (#879) 2020-05-17 11:16:48 +00:00
metrics.rs Fix block processing blowup, upgrade metrics (#500) 2019-08-19 21:02:34 +10:00
service.rs Client identification (#1158) 2020-05-18 21:35:14 +10:00