dont abort on call validation error

This commit is contained in:
Sina Mahmoodi 2023-06-06 21:51:59 +02:00
parent a21920617b
commit 0285f81af3

View file

@ -1162,7 +1162,8 @@ func (s *BlockChainAPI) Multicall(ctx context.Context, blocks []CallBatch, block
state.SetTxContext(txhash, i) state.SetTxContext(txhash, i)
result, err := doCall(ctx, s.b, call, state, header, timeout, gp, &blockContext, &vm.Config{NoBaseFee: true, DisableECRecover: true}) result, err := doCall(ctx, s.b, call, state, header, timeout, gp, &blockContext, &vm.Config{NoBaseFee: true, DisableECRecover: true})
if err != nil { if err != nil {
return nil, err results[bi][i] = callResult{Error: err.Error()}
continue
} }
// If the result contains a revert reason, try to unpack it. // If the result contains a revert reason, try to unpack it.
if len(result.Revert()) > 0 { if len(result.Revert()) > 0 {