mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-04 19:19:44 +00:00
mpt: fix extension node cache invalidation
It should always be invalidated if something changes in the `next` (below the extension node).
This commit is contained in:
parent
24785f1f50
commit
f77c239296
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,6 @@ func (t *Trie) deleteFromExtension(n *ExtensionNode, path []byte) (Node, error)
|
|||
case *ExtensionNode:
|
||||
n.key = append(n.key, nxt.key...)
|
||||
n.next = nxt.next
|
||||
n.invalidateCache()
|
||||
case *HashNode:
|
||||
if nxt.IsEmpty() {
|
||||
return nxt, nil
|
||||
|
@ -269,6 +268,7 @@ func (t *Trie) deleteFromExtension(n *ExtensionNode, path []byte) (Node, error)
|
|||
default:
|
||||
n.next = r
|
||||
}
|
||||
n.invalidateCache()
|
||||
return n, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue