mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/snailchain.go: update the for loop in find common ancestor
This commit is contained in:
parent
5d16717fd3
commit
4702440eff
1 changed files with 1 additions and 1 deletions
|
|
@ -1340,7 +1340,7 @@ func (bc *BlockChain) insertSidechain(it *insertIterator) (int, []interface{}, [
|
|||
numbers []uint64
|
||||
)
|
||||
parent := bc.GetHeader(it.previous().Hash(), it.previous().NumberU64())
|
||||
for parent != nil && !bc.HasState(parent.Root) {
|
||||
for parent != nil && rawdb.ReadCanonicalHash(bc.db, parent.Number.Uint64()) != parent.Hash() {
|
||||
hashes = append(hashes, parent.Hash())
|
||||
numbers = append(numbers, parent.Number.Uint64())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue