This commit is contained in:
Alex Sharov 2021-07-12 08:56:20 +00:00 committed by GitHub
parent f042b5310f
commit 2a8f1959a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ func SpawnIntermediateHashesStage(s *StageState, u Unwinder, tx ethdb.RwTx, cfg
if err == nil {
if cfg.checkRoot && root != expectedRootHash {
log.Error(fmt.Sprintf("[%s] Wrong trie root of block %d: %x, expected (from header): %x", logPrefix, to, root, expectedRootHash))
log.Error(fmt.Sprintf("[%s] Wrong trie root of block %d: %x, expected (from header): %x. Block hash: %x", logPrefix, to, root, expectedRootHash, headerHash))
if to > s.BlockNumber {
log.Warn("Unwinding due to incorrect root hash", "to", to-1)
if err = u.UnwindTo(to-1, tx, headerHash); err != nil {

View File

@ -73,7 +73,7 @@ func (s *State) GetLocalHeight(db ethdb.KVGetter) (uint64, error) {
}
func (s *State) UnwindTo(blockNumber uint64, tx TxOrDb, badBlock common.Hash) error {
log.Info("UnwindTo", "block", blockNumber)
log.Info("UnwindTo", "block", blockNumber, "bad_block_hash", badBlock)
for _, stage := range s.unwindOrder {
if stage.Disabled {
continue