Code cleanup in the sync module (#11552)
* Code cleanup `flush_queue()` is mostly used by tests remove some unused params avoid clones in a few places * Consistent params naming Consistent use of log calls * Fix todo It'a actually not trivial to find out the size of these collections, likely we keep blocks from all kinds of forks in the `self.blocks`/`self.parents` collections and there's no good way to anticipate how many blocks we're going to drain. Most of the time we end up draining 0 blocks and then we drain a whole bunch of them, up to 30 000. * Revert making flush_queue() test-only Address review grumbles * More review grumbles * fix build
This commit is contained in:
@@ -197,8 +197,8 @@ pub trait IoClient: Sync + Send {
|
||||
/// Queue transactions for importing.
|
||||
fn queue_transactions(&self, transactions: Vec<Bytes>, peer_id: usize);
|
||||
|
||||
/// Queue block import with transaction receipts. Does no sealing and transaction validation.
|
||||
fn queue_ancient_block(&self, block_bytes: Unverified, receipts_bytes: Bytes) -> EthcoreResult<H256>;
|
||||
/// Queue block import with transaction receipts. Does no sealing or transaction validation.
|
||||
fn queue_ancient_block(&self, unverified: Unverified, receipts_bytes: Bytes) -> EthcoreResult<H256>;
|
||||
|
||||
/// Queue consensus engine message.
|
||||
fn queue_consensus_message(&self, message: Bytes);
|
||||
|
||||
Reference in New Issue
Block a user