Skip to content

Commit

Permalink
feat: decrease address subsidy when block invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Oct 14, 2019
1 parent 2baa3c7 commit 5409666
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/ckb_sync/node_data_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def invalid_block(local_tip_block)
issue_subsidy_dao_events = dao_events.where(event_type: "issue_subsidy")
issue_subsidy_dao_events.each do |event|
dao_contract.decrement!(:subsidy_granted, event.value)
address = event.address
address.decrement!(:subsidy, event.value)
event.reverted!
end

Expand Down

0 comments on commit 5409666

Please sign in to comment.