make MasternodeVotingSMC tx never timeout (#595)

This commit is contained in:
Daniel Liu 2024-08-03 07:19:22 +08:00 committed by GitHub
parent a9c557730a
commit a0081d998b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1403,7 +1403,11 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr
latest := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
blockNrOrHash = &latest
}
result, _, failed, err, vmErr := DoCall(ctx, s.b, args, *blockNrOrHash, overrides, vm.Config{}, 5*time.Second, s.b.RPCGasCap())
timeout := 5 * time.Second
if args.To != nil && *args.To == common.MasternodeVotingSMCBinary {
timeout = 0
}
result, _, failed, err, vmErr := DoCall(ctx, s.b, args, *blockNrOrHash, overrides, vm.Config{}, timeout, s.b.RPCGasCap())
if err != nil {
return nil, err
}