hash_chain was always initialized with genesis block
This commit is contained in:
parent
24c6708a16
commit
e533f13647
|
@ -140,13 +140,14 @@ impl Chain {
|
|||
.expect("storage with genesis block is required");
|
||||
let best_storage_block = storage.best_block()
|
||||
.expect("non-empty storage is required");
|
||||
let best_storage_block_hash = best_storage_block.hash.clone();
|
||||
|
||||
Chain {
|
||||
genesis_block_hash: genesis_block_hash.clone(),
|
||||
genesis_block_hash: genesis_block_hash,
|
||||
best_storage_block: best_storage_block,
|
||||
storage: storage,
|
||||
hash_chain: HashQueueChain::with_number_of_queues(NUMBER_OF_QUEUES),
|
||||
headers_chain: BestHeadersChain::new(genesis_block_hash),
|
||||
headers_chain: BestHeadersChain::new(best_storage_block_hash),
|
||||
verifying_transactions: LinkedHashMap::new(),
|
||||
memory_pool: MemoryPool::new(),
|
||||
}
|
||||
|
|
|
@ -687,7 +687,7 @@ impl<T> SynchronizationClient<T> where T: TaskExecutor {
|
|||
let new_blocks_headers = headers.split_off(new_block_index);
|
||||
let new_blocks_hashes_len = new_blocks_hashes.len();
|
||||
trace!(
|
||||
target: "sync", "Sch. {} headers from peer#{}. First {:?}, last: {:?}",
|
||||
target: "sync", "New {} headers from peer#{}. First {:?}, last: {:?}",
|
||||
new_blocks_hashes_len,
|
||||
peer_index,
|
||||
new_blocks_hashes[0].to_reversed_str(),
|
||||
|
|
Loading…
Reference in New Issue