瀏覽代碼

snapshot: add Unlock before return (#20948)

* Forget Unlock in snapshot

* Remove Unlock before panic
Boqin Qin 5 年之前
父節點
當前提交
7599999dcd
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      core/state/snapshot/iterator.go

+ 1 - 0
core/state/snapshot/iterator.go

@@ -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))