Skip to content

Commit 9ebdff2

Browse files
committed
rpc: disable norefund option
1 parent 006cd7b commit 9ebdff2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

silkworm/core/execution/processor.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re
261261
}
262262

263263
CallResult ExecutionProcessor::call(const Transaction& txn, const std::vector<std::shared_ptr<EvmTracer>>& tracers, bool refund) noexcept {
264+
(void)refund;
264265
const std::optional<evmc::address> sender{txn.sender()};
265266
SILKWORM_ASSERT(sender);
266267

@@ -303,10 +304,8 @@ CallResult ExecutionProcessor::call(const Transaction& txn, const std::vector<st
303304
uint64_t gas_left{result.gas_left};
304305
uint64_t gas_used{txn.gas_limit - result.gas_left};
305306

306-
if (refund && !evm().bailout) {
307-
gas_used = txn.gas_limit - refund_gas(txn, effective_gas_price, result.gas_left, result.gas_refund);
308-
gas_left = txn.gas_limit - gas_used;
309-
}
307+
gas_used = txn.gas_limit - refund_gas(txn, effective_gas_price, result.gas_left, result.gas_refund);
308+
gas_left = txn.gas_limit - gas_used;
310309

311310
// Reward the fee recipient
312311
const intx::uint256 priority_fee_per_gas{txn.max_fee_per_gas >= base_fee_per_gas ? txn.priority_fee_per_gas(base_fee_per_gas)

0 commit comments

Comments
 (0)