mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
refactor: make snapshot.New() for loop obvious
This commit is contained in:
parent
9e3eb14570
commit
f86318ca1a
1 changed files with 1 additions and 2 deletions
|
|
@ -218,9 +218,8 @@ func New(config Config, diskdb ethdb.KeyValueStore, triedb *triedb.Database, roo
|
||||||
return snap, nil
|
return snap, nil
|
||||||
}
|
}
|
||||||
// Existing snapshot loaded, seed all the layers
|
// Existing snapshot loaded, seed all the layers
|
||||||
for head != nil {
|
for ; head != nil; head = head.Parent() {
|
||||||
snap.layers[head.Root()] = head
|
snap.layers[head.Root()] = head
|
||||||
head = head.Parent()
|
|
||||||
}
|
}
|
||||||
return snap, nil
|
return snap, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue