This commit is contained in:
Nikolay Volf 2016-03-13 15:59:25 +01:00
parent 0684abd345
commit 809c239ff8
2 changed files with 2 additions and 6 deletions

View File

@ -471,11 +471,7 @@ impl<V> BlockChainClient for Client<V> where V: Verifier {
}
fn block_receipts(&self, hash: &H256) -> Option<Bytes> {
self.chain.block_receipts(hash).and_then(|receipts| {
let mut rlp = RlpStream::new();
rlp.append(&receipts);
Some(rlp.out())
})
self.chain.block_receipts(hash).map(|receipts| rlp::encode(&receipts).to_vec())
}
fn import_block(&self, bytes: Bytes) -> ImportResult {

View File

@ -66,7 +66,7 @@ const MAX_BODIES_TO_SEND: usize = 256;
const MAX_HEADERS_TO_SEND: usize = 512;
const MAX_NODE_DATA_TO_SEND: usize = 1024;
const MAX_RECEIPTS_TO_SEND: usize = 1024;
const MAX_RECEIPTS_HEADERS_TO_SEND: usize = 16;
const MAX_RECEIPTS_HEADERS_TO_SEND: usize = 256;
const MAX_HEADERS_TO_REQUEST: usize = 512;
const MAX_BODIES_TO_REQUEST: usize = 256;
const MIN_PEERS_PROPAGATION: usize = 4;