Skip to content

Commit

Permalink
feat: should update dao contract's depositors and total depositors
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Oct 10, 2019
1 parent d6d43cb commit 3432a71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/ckb_sync/node_data_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def process_block(node_block)
dao_contract.increment!(:total_deposit, event.value)
dao_contract.increment!(:deposit_transactions_count)
end
new_dao_depositor_events = dao_events.where(event_type: "new_dao_depositor")
new_dao_depositor_events.each do
dao_contract.increment!(:depositors_count)
dao_contract.increment!(:total_depositors_count)
end
end
end

Expand Down

0 comments on commit 3432a71

Please sign in to comment.