diff --git a/db/src/storage.rs b/db/src/storage.rs index b792d986..9190f3f6 100644 --- a/db/src/storage.rs +++ b/db/src/storage.rs @@ -640,19 +640,34 @@ impl Store for Storage { Err(Error::Consistency(consistency_error)) => { match consistency_error { ConsistencyError::DoubleSpend(hash) => { - warn!(target: "reorg", "Failed to reorganize to {} due to double-spend at {}", &block_hash, &hash); + warn!( + target: "reorg", + "Failed to reorganize to {} due to double-spend at {}", + block_hash.to_reversed_str(), + hash.to_reversed_str() + ); // return without any commit return Err(Error::reorganize(&hash)); }, ConsistencyError::UnknownSpending(hash) => { - warn!(target: "reorg", "Failed to reorganize to {} due to spending unknown transaction {}", &block_hash, &hash); + warn!( + target: "reorg", + "Failed to reorganize to {} due to spending unknown transaction {}", + block_hash.to_reversed_str(), + hash.to_reversed_str() + ); // return without any commit return Err(Error::reorganize(&hash)); }, ConsistencyError::Unknown(hash) => { // this is orphan block inserted or disconnected chain head updated, we allow that (by now) // so it is no-op - warn!(target: "reorg", "Disconnected chain head {} updated with {}", &hash, &block_hash); + warn!( + target: "reorg", + "Disconnected chain head {} updated with {}", + hash.to_reversed_str(), + block_hash.to_reversed_str() + ); }, _ => { // we don't allow other errors on side chain/orphans diff --git a/sync/src/synchronization_client.rs b/sync/src/synchronization_client.rs index 72a2db58..20499a37 100644 --- a/sync/src/synchronization_client.rs +++ b/sync/src/synchronization_client.rs @@ -335,7 +335,13 @@ impl Client for SynchronizationClient where T: TaskExecutor { if { self.chain.read().block_state(&header0.previous_header_hash) == BlockState::Unknown } { - warn!(target: "sync", "Previous header of the first header from peer#{} `headers` message is unknown. First: {:?}. Previous: {:?}", peer_index, header0.hash(), header0.previous_header_hash); + warn!( + target: "sync", + "Previous header of the first header from peer#{} `headers` message is unknown. First: {:?}. Previous: {:?}", + peer_index, + header0.hash().to_reversed_str(), + header0.previous_header_hash.to_reversed_str() + ); return; } @@ -463,7 +469,7 @@ impl Client for SynchronizationClient where T: TaskExecutor { /// Process failed block verification fn on_block_verification_error(&mut self, err: &str, hash: &H256) { - warn!(target: "sync", "Block {:?} verification failed with error {:?}", hash, err); + warn!(target: "sync", "Block {:?} verification failed with error {:?}", hash.to_reversed_str(), err); { let mut chain = self.chain.write();