lighthouse/beacon_node
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
..
beacon_chain Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
client Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
eth1 Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
eth2-libp2p Adds counter of received chunks to an OutboundSubstream. Ends the str… (#1126) 2020-05-18 21:41:01 +10:00
genesis Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
network Client identification (#1158) 2020-05-18 21:35:14 +10:00
operation_pool Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
rest_api Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
src Stable futures (#879) 2020-05-17 11:16:48 +00:00
store Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
tests Faster attestation production (#838) 2020-03-04 17:10:22 +11:00
timer Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
version v0.1.2 (#1155) 2020-05-18 15:05:23 +10:00
websocket_server Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00
Cargo.toml Directory Restructure (#1163) 2020-05-18 21:24:23 +10:00