expose NodeIterator
This commit is contained in:
parent
a5a95c2a9f
commit
3ddb592d6b
@ -44,7 +44,7 @@ type Trie interface {
|
|||||||
TryGet(key []byte) ([]byte, error)
|
TryGet(key []byte) ([]byte, error)
|
||||||
TryGetAccount(key []byte) (*types.StateAccount, error)
|
TryGetAccount(key []byte) (*types.StateAccount, error)
|
||||||
Hash() common.Hash
|
Hash() common.Hash
|
||||||
// NodeIterator(startKey []byte) trie.NodeIterator
|
NodeIterator(startKey []byte) trie.NodeIterator
|
||||||
Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) error
|
Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,6 +101,12 @@ func (t *StateTrie) Hash() common.Hash {
|
|||||||
return t.trie.Hash()
|
return t.trie.Hash()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NodeIterator returns an iterator that returns nodes of the underlying trie. Iteration
|
||||||
|
// starts at the key after the given start key.
|
||||||
|
func (t *StateTrie) NodeIterator(start []byte) NodeIterator {
|
||||||
|
return t.trie.NodeIterator(start)
|
||||||
|
}
|
||||||
|
|
||||||
// hashKey returns the hash of key as an ephemeral buffer.
|
// hashKey returns the hash of key as an ephemeral buffer.
|
||||||
// The caller must not hold onto the return value because it will become
|
// The caller must not hold onto the return value because it will become
|
||||||
// invalid on the next call to hashKey or secKey.
|
// invalid on the next call to hashKey or secKey.
|
||||||
|
Loading…
Reference in New Issue
Block a user