Renaming status fields to something more descriptive.

This commit is contained in:
Tomasz Drwięga
2016-03-17 11:19:12 +01:00
parent 884f2dd873
commit e1c3ab1846
5 changed files with 18 additions and 16 deletions

View File

@@ -403,7 +403,7 @@ impl ChainSync {
self.remove_downloaded_blocks(number + 1);
}
if self.have_common_block && number < self.current_base_block() + 1 {
// unkown header
// unkown header
debug!(target: "sync", "Old block header {:?} ({}) is unknown, restarting sync", hash, number);
self.restart(io);
return Ok(());
@@ -1633,14 +1633,14 @@ mod tests {
// when
sync.chain_new_blocks(&mut io, &[], &[], &[], &good_blocks);
assert_eq!(sync.miner.status().transaction_queue_future, 0);
assert_eq!(sync.miner.status().transaction_queue_pending, 1);
assert_eq!(sync.miner.status().transactions_in_future_queue, 0);
assert_eq!(sync.miner.status().transactions_in_pending_queue, 1);
sync.chain_new_blocks(&mut io, &good_blocks, &[], &[], &retracted_blocks);
// then
let status = sync.miner.status();
assert_eq!(status.transaction_queue_pending, 1);
assert_eq!(status.transaction_queue_future, 0);
assert_eq!(status.transactions_in_pending_queue, 1);
assert_eq!(status.transactions_in_future_queue, 0);
}
#[test]