From 42418d18ad930341d9b873c145458c3c247b75bc Mon Sep 17 00:00:00 2001 From: ledgerwatch <akhounov@gmail.com> Date: Thu, 12 Aug 2021 09:13:23 +0100 Subject: [PATCH] trace_call and trace_callMany to set gasPrice = basefee if not specified (#2513) Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local> --- cmd/rpcdaemon/commands/trace_adhoc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/rpcdaemon/commands/trace_adhoc.go b/cmd/rpcdaemon/commands/trace_adhoc.go index f85f441db9..ea3a37f68e 100644 --- a/cmd/rpcdaemon/commands/trace_adhoc.go +++ b/cmd/rpcdaemon/commands/trace_adhoc.go @@ -196,6 +196,10 @@ func (args *TraceCallParam) ToMessage(globalGasCap uint64, baseFee *uint256.Int) if gasFeeCap.BitLen() > 0 || gasTipCap.BitLen() > 0 { gasPrice = math2.U256Min(new(uint256.Int).Add(gasTipCap, baseFee), gasFeeCap) } + // Still zero + if gasPrice.IsZero() { + gasPrice.Set(baseFee) + } } } value := new(uint256.Int) -- GitLab