We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2ae9db commit 2679c51Copy full SHA for 2679c51
core/src/consensus/consensus_inner/consensus_executor.rs
@@ -1118,6 +1118,21 @@ impl ConsensusExecutionHandler {
1118
to_pending.push(transaction.clone());
1119
}
1120
1121
+ Err(ExecutionError::NotEnoughCash {
1122
+ required: _,
1123
+ got: _,
1124
+ actual_gas_cost,
1125
+ }) => {
1126
+ /* We charge `actual_gas_cost`, so increase
1127
+ * `env.gas_used` to make
1128
+ * this charged balance distributed to
1129
+ * miners.
1130
+ * Note for the case that `balance < tx_fee`,
1131
+ * the amount
1132
+ * of remainder is lost forever. */
1133
+ env.gas_used +=
1134
+ actual_gas_cost / transaction.gas_price;
1135
+ }
1136
Ok(ref executed) => {
1137
env.gas_used = executed.cumulative_gas_used;
1138
transaction_logs = executed.logs.clone();
0 commit comments