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