mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 13:24:21 +00:00
fix contract call in gst and executor.nim
This commit is contained in:
parent
8b3b1f4c57
commit
5ba44083f0
@ -27,7 +27,7 @@ proc contractCall(t: Transaction, vmState: BaseVMState, sender: EthAddress, fork
|
|||||||
if execComputation(computation):
|
if execComputation(computation):
|
||||||
let
|
let
|
||||||
gasRemaining = computation.gasMeter.gasRemaining.u256
|
gasRemaining = computation.gasMeter.gasRemaining.u256
|
||||||
gasRefunded = computation.gasMeter.gasRefunded.u256
|
gasRefunded = computation.getGasRefund().u256
|
||||||
gasUsed = t.gasLimit.u256 - gasRemaining
|
gasUsed = t.gasLimit.u256 - gasRemaining
|
||||||
gasRefund = min(gasRefunded, gasUsed div 2)
|
gasRefund = min(gasRefunded, gasUsed div 2)
|
||||||
gasRefundAmount = (gasRefund + gasRemaining) * t.gasPrice.u256
|
gasRefundAmount = (gasRefund + gasRemaining) * t.gasPrice.u256
|
||||||
|
@ -73,7 +73,7 @@ proc testFixtureIndexes(prevStateRoot: Hash256, header: BlockHeader, pre: JsonNo
|
|||||||
if execComputation(computation):
|
if execComputation(computation):
|
||||||
let
|
let
|
||||||
gasRemaining = computation.gasMeter.gasRemaining.u256
|
gasRemaining = computation.gasMeter.gasRemaining.u256
|
||||||
gasRefunded = computation.gasMeter.gasRefunded.u256
|
gasRefunded = computation.getGasRefund().u256
|
||||||
gasUsed = transaction.gasLimit.u256 - gasRemaining
|
gasUsed = transaction.gasLimit.u256 - gasRemaining
|
||||||
gasRefund = min(gasRefunded, gasUsed div 2)
|
gasRefund = min(gasRefunded, gasUsed div 2)
|
||||||
gasRefundAmount = (gasRefund + gasRemaining) * transaction.gasPrice.u256
|
gasRefundAmount = (gasRefund + gasRemaining) * transaction.gasPrice.u256
|
||||||
|
Loading…
x
Reference in New Issue
Block a user