Skip to content

Commit

Permalink
Apply miner rewards on transaction finalization
Browse files Browse the repository at this point in the history
  • Loading branch information
sorpaas committed Jul 12, 2017
1 parent d9cc455 commit 6a2dd50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm/eval/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ impl<M: Memory + Default> Machine<M> {
self.state.account_state.increase_balance(self.state.context.caller, preclaimed_value);
self.state.account_state.decrease_balance(self.state.context.caller, gas_dec.into());

// Apply miner rewards
self.state.account_state.increase_balance(self.state.block.coinbase, gas_dec.into());

for address in &self.state.removed {
self.state.account_state.remove(*address).unwrap();
}
Expand Down

0 comments on commit 6a2dd50

Please sign in to comment.