mirror of https://github.com/poanetwork/quorum.git
added nil pointer check for args.Value to avoid a panic in estimate gas call (#989)
This commit is contained in:
parent
3ae914052f
commit
80564d5f26
|
@ -972,7 +972,7 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
|
|||
//This makes the return value a potential over-estimate of gas, rather than the exact cost to run right now
|
||||
|
||||
//if the transaction has a value then it cannot be private, so we can skip this check
|
||||
if args.Value.ToInt().Cmp(big.NewInt(0)) == 0 {
|
||||
if args.Value != nil && args.Value.ToInt().Cmp(big.NewInt(0)) == 0 {
|
||||
homestead := b.ChainConfig().IsHomestead(new(big.Int).SetInt64(int64(rpc.PendingBlockNumber)))
|
||||
istanbul := b.ChainConfig().IsIstanbul(new(big.Int).SetInt64(int64(rpc.PendingBlockNumber)))
|
||||
var data []byte
|
||||
|
|
Loading…
Reference in New Issue