rename blocks to blockStateCalls

This commit is contained in:
Sina Mahmoodi 2023-07-31 15:48:03 +02:00
parent 63f4f6e5a8
commit 80506eaa9c
2 changed files with 4 additions and 4 deletions

View file

@ -1215,7 +1215,7 @@ func (r *callResult) MarshalJSON() ([]byte, error) {
} }
type multicallOpts struct { type multicallOpts struct {
Blocks []CallBatch BlockStateCalls []CallBatch
TraceTransfers bool TraceTransfers bool
} }
@ -1236,7 +1236,7 @@ func (s *BlockChainAPI) MulticallV1(ctx context.Context, opts multicallOpts, blo
var ( var (
cancel context.CancelFunc cancel context.CancelFunc
timeout = s.b.RPCEVMTimeout() timeout = s.b.RPCEVMTimeout()
blocks = opts.Blocks blocks = opts.BlockStateCalls
) )
if timeout > 0 { if timeout > 0 {
ctx, cancel = context.WithTimeout(ctx, timeout) ctx, cancel = context.WithTimeout(ctx, timeout)

View file

@ -1214,7 +1214,7 @@ func TestMulticallV1(t *testing.T) {
for i, tc := range testSuite { for i, tc := range testSuite {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
opts := multicallOpts{Blocks: tc.blocks} opts := multicallOpts{BlockStateCalls: tc.blocks}
if tc.includeTransfers != nil && *tc.includeTransfers { if tc.includeTransfers != nil && *tc.includeTransfers {
opts.TraceTransfers = true opts.TraceTransfers = true
} }