mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Forget Unlock in snapshot
This commit is contained in:
parent
648b0cb714
commit
511b9a68e5
2 changed files with 3 additions and 0 deletions
|
|
@ -125,8 +125,10 @@ func (it *diffAccountIterator) Account() []byte {
|
|||
blob, ok := it.layer.accountData[it.curHash]
|
||||
if !ok {
|
||||
if _, ok := it.layer.destructSet[it.curHash]; ok {
|
||||
it.layer.lock.RUnlock()
|
||||
return nil
|
||||
}
|
||||
it.layer.lock.RUnlock()
|
||||
panic(fmt.Sprintf("iterator referenced non-existent account: %x", it.curHash))
|
||||
}
|
||||
it.layer.lock.RUnlock()
|
||||
|
|
|
|||
|
|
@ -420,6 +420,7 @@ func diffToDisk(bottom *diffLayer) *diskLayer {
|
|||
// Mark the original base as stale as we're going to create a new wrapper
|
||||
base.lock.Lock()
|
||||
if base.stale {
|
||||
base.lock.Unlock()
|
||||
panic("parent disk layer is stale") // we've committed into the same base from two children, boo
|
||||
}
|
||||
base.stale = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue