Commit cedf8be4 authored by winsvega's avatar winsvega Committed by Martin Holst Swende

retesteth: enable maxResults in AccountRange (#20020)

parent d5bd3838
...@@ -679,7 +679,7 @@ func (api *RetestethAPI) AccountRange(ctx context.Context, ...@@ -679,7 +679,7 @@ func (api *RetestethAPI) AccountRange(ctx context.Context,
} }
it := trie.NewIterator(accountTrie.NodeIterator(common.BigToHash((*big.Int)(addressHash)).Bytes())) it := trie.NewIterator(accountTrie.NodeIterator(common.BigToHash((*big.Int)(addressHash)).Bytes()))
result := AccountRangeResult{AddressMap: make(map[common.Hash]common.Address)} result := AccountRangeResult{AddressMap: make(map[common.Hash]common.Address)}
for i := 0; /*i < int(maxResults) && */ it.Next(); i++ { for i := 0; i < int(maxResults) && it.Next(); i++ {
if preimage := accountTrie.GetKey(it.Key); preimage != nil { if preimage := accountTrie.GetKey(it.Key); preimage != nil {
result.AddressMap[common.BytesToHash(it.Key)] = common.BytesToAddress(preimage) result.AddressMap[common.BytesToHash(it.Key)] = common.BytesToAddress(preimage)
//fmt.Printf("%x: %x\n", it.Key, preimage) //fmt.Printf("%x: %x\n", it.Key, preimage)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment