diff options
author | obscuren <geffobscura@gmail.com> | 2015-05-28 21:46:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-05-28 21:46:36 +0800 |
commit | 109f9956848c83cf7683e123ab5f2358371d9e37 (patch) | |
tree | 5824202dad60a707a6b3147518bf9a1195ba2090 /core | |
parent | 75f5ae80fd8a63d3e21462bcb7c338f44cd2b6e8 (diff) | |
download | dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar.gz dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar.bz2 dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar.lz dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar.xz dexon-109f9956848c83cf7683e123ab5f2358371d9e37.tar.zst dexon-109f9956848c83cf7683e123ab5f2358371d9e37.zip |
core: log block hash during nonce error
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 24ef2c0ab..86e90a815 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -826,7 +826,7 @@ func verifyNonces(pow pow.PoW, blocks []*types.Block) error { func verifyNonce(pow pow.PoW, in <-chan *types.Block, done chan<- error) { for block := range in { if !pow.Verify(block) { - done <- ValidationError("Block(#%v) nonce is invalid (= %x)", block.Number(), block.Nonce) + done <- ValidationError("Block (#%v / %x) nonce is invalid (= %x)", block.Number(), block.Hash(), block.Nonce) } else { done <- nil } @@ -835,7 +835,7 @@ func verifyNonce(pow pow.PoW, in <-chan *types.Block, done chan<- error) { func verifyBlockNonce(pow pow.PoW, block *types.Block, done chan<- error) { if !pow.Verify(block) { - done <- ValidationError("Block(#%v) nonce is invalid (= %x)", block.Number(), block.Nonce) + done <- ValidationError("Block (#%v / %x) nonce is invalid (= %x)", block.Number(), block.Hash(), block.Nonce) } else { done <- nil } |