Skip to content

Commit

Permalink
fix: deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Jul 22, 2019
1 parent 7323f17 commit 786ebf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/ckb_sync/persist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def save_block(node_block, sync_type)
local_block.address_ids = AccountBook.where(ckb_transaction: local_block.ckb_transactions).pluck(:address_id).uniq
local_block.save!

update_pending_rewards(local_block.miner_address)
calculate_tx_fee(local_block)
local_block.contained_addresses.each(&method(:update_address_balance_and_ckb_transactions_count))
end

update_pending_rewards(local_block.miner_address)

local_block
end

Expand Down

0 comments on commit 786ebf8

Please sign in to comment.