mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
make MasternodeVotingSMC tx never timeout (#598)
This commit is contained in:
parent
438341c2ea
commit
824c531324
1 changed files with 6 additions and 1 deletions
|
|
@ -1399,7 +1399,12 @@ func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNrOr
|
||||||
latest := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
|
latest := rpc.BlockNumberOrHashWithNumber(rpc.LatestBlockNumber)
|
||||||
blockNrOrHash = &latest
|
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
|
||||||
|
MasternodeVotingSMCBinary := common.Address{19: 0x88} // xdc0000000000000000000000000000000000000088
|
||||||
|
if args.To != nil && *args.To == MasternodeVotingSMCBinary {
|
||||||
|
timeout = 0
|
||||||
|
}
|
||||||
|
result, _, failed, err, vmErr := DoCall(ctx, s.b, args, *blockNrOrHash, overrides, vm.Config{}, timeout, s.b.RPCGasCap())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue