Don't try to send oversized packets (#10042)

* Don't construct oversized packets

* Add test for payload limit

* [eth-sync] Fix wrongly computed data sizes

* Replace `MAX_RECEIPTS_TO_SEND` with overall softlimit
This commit is contained in:
Nicolas Gotchac
2019-01-04 19:58:21 +01:00
committed by Afri Schoedon
parent b180be7526
commit e435407080
8 changed files with 109 additions and 19 deletions

View File

@@ -144,6 +144,10 @@ impl<'p, C> SyncIo for TestIo<'p, C> where C: FlushingBlockChainClient, C: 'p {
fn chain_overlay(&self) -> &RwLock<HashMap<BlockNumber, Bytes>> {
&self.overlay
}
fn payload_soft_limit(&self) -> usize {
100_000
}
}
/// Mock for emulution of async run of new blocks