Unverified Commit 7599999d authored by Boqin Qin's avatar Boqin Qin Committed by GitHub

snapshot: add Unlock before return (#20948)

* Forget Unlock in snapshot

* Remove Unlock before panic
parent 79b68dd7
......@@ -125,6 +125,7 @@ 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
}
panic(fmt.Sprintf("iterator referenced non-existent account: %x", it.curHash))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment