mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
unit test for seeking prefixed key
This commit is contained in:
parent
7d25dfe6f8
commit
18e4da21de
1 changed files with 6 additions and 0 deletions
|
|
@ -227,6 +227,12 @@ func TestIteratorSeek(t *testing.T) {
|
|||
if err := checkIteratorOrder(nil, it); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// Seek to a key for which a prefixing key exists.
|
||||
it = NewIterator(trie.MustNodeIterator([]byte("food")))
|
||||
if err := checkIteratorOrder(testdata1[5:], it); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func checkIteratorOrder(want []kvs, it *Iterator) error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue