If something costs 0 gas, make it 1.
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
9cd34509ee
commit
4f60c1afe7
@ -268,6 +268,10 @@ func tallyGasCharges(charges map[string]*stats, et types.ExecutionTrace) {
|
|||||||
for _, gc := range et.GasCharges {
|
for _, gc := range et.GasCharges {
|
||||||
|
|
||||||
compGas := gc.ComputeGas + gc.VirtualComputeGas
|
compGas := gc.ComputeGas + gc.VirtualComputeGas
|
||||||
|
if compGas == 0 {
|
||||||
|
compGas = 1
|
||||||
|
}
|
||||||
|
|
||||||
ratio := float64(compGas) / float64(gc.TimeTaken.Nanoseconds())
|
ratio := float64(compGas) / float64(gc.TimeTaken.Nanoseconds())
|
||||||
|
|
||||||
s := charges[gc.Name]
|
s := charges[gc.Name]
|
||||||
|
Loading…
Reference in New Issue
Block a user