rpc: Rename AccountRangeAt to AccountRange

This commit is contained in:
Guillaume Ballet 2019-07-08 14:40:42 +02:00
parent 70de8fb0c1
commit 1783c3bf0c
3 changed files with 6 additions and 6 deletions

View file

@ -86,7 +86,7 @@ type RetestethEthAPI interface {
} }
type RetestethDebugAPI interface { type RetestethDebugAPI interface {
AccountRangeAt(ctx context.Context, AccountRange(ctx context.Context,
blockHashOrNumber *math.HexOrDecimal256, txIndex uint64, blockHashOrNumber *math.HexOrDecimal256, txIndex uint64,
addressHash *math.HexOrDecimal256, maxResults uint64, addressHash *math.HexOrDecimal256, maxResults uint64,
) (AccountRangeResult, error) ) (AccountRangeResult, error)
@ -604,7 +604,7 @@ func (api *RetestethAPI) GetBlockByNumber(ctx context.Context, blockNr math.HexO
return nil, fmt.Errorf("block %d not found", blockNr) return nil, fmt.Errorf("block %d not found", blockNr)
} }
func (api *RetestethAPI) AccountRangeAt(ctx context.Context, func (api *RetestethAPI) AccountRange(ctx context.Context,
blockHashOrNumber *math.HexOrDecimal256, txIndex uint64, blockHashOrNumber *math.HexOrDecimal256, txIndex uint64,
addressHash *math.HexOrDecimal256, maxResults uint64, addressHash *math.HexOrDecimal256, maxResults uint64,
) (AccountRangeResult, error) { ) (AccountRangeResult, error) {

View file

@ -371,8 +371,8 @@ const (
AccountRangeMaxResults = 256 AccountRangeMaxResults = 256
) )
// AccountRangeAt enumerates all accounts in the latest state // AccountRange enumerates all accounts in the latest state
func (api *PrivateDebugAPI) AccountRangeAt(ctx context.Context, start *common.Hash, maxResults int) (AccountRangeResult, error) { func (api *PrivateDebugAPI) AccountRange(ctx context.Context, start *common.Hash, maxResults int) (AccountRangeResult, error) {
var statedb *state.StateDB var statedb *state.StateDB
var err error var err error
block := api.eth.blockchain.CurrentBlock() block := api.eth.blockchain.CurrentBlock()

View file

@ -51,7 +51,7 @@ func accountRangeTest(t *testing.T, trie *state.Trie, statedb *state.StateDB, st
return result return result
} }
func TestAccountRangeAt(t *testing.T) { func TestAccountRange(t *testing.T) {
var ( var (
statedb = state.NewDatabase(rawdb.NewMemoryDatabase()) statedb = state.NewDatabase(rawdb.NewMemoryDatabase())
state, _ = state.New(common.Hash{}, statedb) state, _ = state.New(common.Hash{}, statedb)
@ -102,7 +102,7 @@ func TestAccountRangeAt(t *testing.T) {
} }
} }
func TestEmptyAccountRangeAt(t *testing.T) { func TestEmptyAccountRange(t *testing.T) {
var ( var (
statedb = state.NewDatabase(rawdb.NewMemoryDatabase()) statedb = state.NewDatabase(rawdb.NewMemoryDatabase())
state, _ = state.New(common.Hash{}, statedb) state, _ = state.New(common.Hash{}, statedb)