mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
rename method to eth_simulateV1
This commit is contained in:
parent
589107b6f5
commit
89df0e3b2c
4 changed files with 6 additions and 6 deletions
|
|
@ -1233,14 +1233,14 @@ func (s *BlockChainAPI) Call(ctx context.Context, args TransactionArgs, blockNrO
|
|||
return result.Return(), result.Err
|
||||
}
|
||||
|
||||
// MulticallV1 executes series of transactions on top of a base state.
|
||||
// SimulateV1 executes series of transactions on top of a base state.
|
||||
// The transactions are packed into blocks. For each block, block header
|
||||
// fields can be overridden. The state can also be overridden prior to
|
||||
// execution of each block.
|
||||
//
|
||||
// Note, this function doesn't make any changes in the state/blockchain and is
|
||||
// useful to execute and retrieve values.
|
||||
func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts mcOpts, blockNrOrHash *rpc.BlockNumberOrHash) ([]mcBlockResult, error) {
|
||||
func (s *BlockChainAPI) SimulateV1(ctx context.Context, opts mcOpts, blockNrOrHash *rpc.BlockNumberOrHash) ([]mcBlockResult, error) {
|
||||
if len(opts.BlockStateCalls) == 0 {
|
||||
return nil, &invalidParamsError{message: "empty input"}
|
||||
} else if len(opts.BlockStateCalls) > maxMulticallBlocks {
|
||||
|
|
|
|||
|
|
@ -946,7 +946,7 @@ func TestCall(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestMulticallV1(t *testing.T) {
|
||||
func TestSimulateV1(t *testing.T) {
|
||||
t.Parallel()
|
||||
// Initialize test accounts
|
||||
var (
|
||||
|
|
@ -1794,7 +1794,7 @@ func TestMulticallV1(t *testing.T) {
|
|||
if tc.validation != nil && *tc.validation {
|
||||
opts.Validation = true
|
||||
}
|
||||
result, err := api.MulticallV1(context.Background(), opts, &tc.tag)
|
||||
result, err := api.SimulateV1(context.Background(), opts, &tc.tag)
|
||||
if tc.expectErr != nil {
|
||||
if err == nil {
|
||||
t.Fatalf("test %s: want error %v, have nothing", tc.name, tc.expectErr)
|
||||
|
|
|
|||
|
|
@ -618,8 +618,8 @@ web3._extend({
|
|||
inputFormatter: [web3._extend.formatters.inputCallFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter, null, null],
|
||||
}),
|
||||
new web3._extend.Method({
|
||||
name: 'multicallV1',
|
||||
call: 'eth_multicallV1',
|
||||
name: 'simulateV1',
|
||||
call: 'eth_simulateV1',
|
||||
params: 3,
|
||||
inputFormatter: [null, web3._extend.formatters.inputDefaultBlockNumberFormatter, null],
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue