remove unused 'refundGas' from evm/state_transactions
This commit is contained in:
parent
2bce04afc7
commit
74e76e5237
|
@ -36,13 +36,6 @@ proc setupTxContext*(vmState: BaseVMState, origin: EthAddress, gasPrice: GasInt,
|
||||||
vmState.gasCosts = vmState.fork.forkToSchedule
|
vmState.gasCosts = vmState.fork.forkToSchedule
|
||||||
|
|
||||||
|
|
||||||
proc refundGas*(c: Computation, tx: Transaction, sender: EthAddress) =
|
|
||||||
let maxRefund = (tx.gasLimit - c.gasMeter.gasRemaining) div 2
|
|
||||||
c.gasMeter.returnGas min(c.getGasRefund(), maxRefund)
|
|
||||||
c.vmState.mutateStateDB:
|
|
||||||
db.addBalance(sender, c.gasMeter.gasRemaining.u256 * tx.gasPrice.u256)
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME-awkwardFactoring: the factoring out of the pre and
|
# FIXME-awkwardFactoring: the factoring out of the pre and
|
||||||
# post parts feels awkward to me, but for now I'd really like
|
# post parts feels awkward to me, but for now I'd really like
|
||||||
# not to have too much duplicated code between sync and async.
|
# not to have too much duplicated code between sync and async.
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
## healing algorithm again.
|
## healing algorithm again.
|
||||||
##
|
##
|
||||||
import
|
import
|
||||||
std/[math, sequtils],
|
std/[math, sequtils, tables],
|
||||||
chronicles,
|
chronicles,
|
||||||
chronos,
|
chronos,
|
||||||
eth/[common, p2p, trie/nibbles, trie/trie_defs, rlp],
|
eth/[common, p2p, trie/nibbles, trie/trie_defs, rlp],
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
## healing algorithm again.
|
## healing algorithm again.
|
||||||
##
|
##
|
||||||
import
|
import
|
||||||
std/[math, sequtils],
|
std/[math, sequtils, tables],
|
||||||
chronicles,
|
chronicles,
|
||||||
chronos,
|
chronos,
|
||||||
eth/[common, p2p, trie/nibbles],
|
eth/[common, p2p, trie/nibbles],
|
||||||
|
|
Loading…
Reference in New Issue