mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: address comment
This commit is contained in:
parent
b29bf9fcab
commit
fd59c9caf1
1 changed files with 6 additions and 1 deletions
|
|
@ -1680,7 +1680,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
|
||||||
// as the canonical chain eventually, it needs to be reexecuted for missing
|
// as the canonical chain eventually, it needs to be reexecuted for missing
|
||||||
// state, but if it's this special case here(skip reexecution) we will lose
|
// state, but if it's this special case here(skip reexecution) we will lose
|
||||||
// the empty receipt entry.
|
// the empty receipt entry.
|
||||||
rawdb.WriteReceipts(bc.db, block.Hash(), block.NumberU64(), nil)
|
if len(block.Transactions()) == 0 {
|
||||||
|
rawdb.WriteReceipts(bc.db, block.Hash(), block.NumberU64(), nil)
|
||||||
|
} else {
|
||||||
|
log.Error("Please file an issue, skip known block execution without receipt",
|
||||||
|
"hash", block.Hash(), "number", block.NumberU64())
|
||||||
|
}
|
||||||
if err := bc.writeKnownBlock(block); err != nil {
|
if err := bc.writeKnownBlock(block); err != nil {
|
||||||
return it.index, err
|
return it.index, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue