Skip to content

Commit

Permalink
state/stateobject: debug future;
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbundler committed Nov 1, 2023
1 parent a84415b commit 85b4010
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion trie/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,14 @@ func (t *Trie) getWithEpoch(origNode node, key []byte, pos int, epoch types.Stat
n.flags = t.newFlag()
didResolve = true
}
if err != nil {
return value, n, didResolve, fmt.Errorf("getWithEpoch err, epoch: %v, node:%v, err: %v", epoch, n.fstring(""), err)
}
return value, n, didResolve, err
case hashNode:
child, err := t.resolveAndTrack(n, key[:pos])
if err != nil {
return nil, n, true, err
return nil, n, true, fmt.Errorf("getWithEpoch err, epoch: %v, node:%v, err: %v", epoch, n.fstring(""), err)
}

if err = t.resolveEpochMetaAndTrack(child, epoch, key[:pos]); err != nil {
Expand Down Expand Up @@ -954,6 +957,7 @@ func (t *Trie) deleteWithEpoch(n node, prefix, key []byte, epoch types.StateEpoc
// shortNode{..., shortNode{...}}. Since the entry
// might not be loaded yet, resolve it just for this
// check.
// TODO(0xbundler): if Children[pos] has pruned? fetch from remote?
cnode, err := t.resolve(n.Children[pos], append(prefix, byte(pos)), n.GetChildEpoch(pos))
if err != nil {
return false, nil, err
Expand Down

0 comments on commit 85b4010

Please sign in to comment.