Skip to content

Commit

Permalink
Merge pull request #2255 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
Deploy to mainnet
  • Loading branch information
rabbitz authored Oct 21, 2024
2 parents 4a03154 + f2fb96e commit 0526036
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/workers/generate_udt_holder_allocation_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def calculate_holder_allocation_data(unique_ckb_address_ids)
allocation_data = {}

unique_ckb_address_ids.each_slice(500) do |batch_address_ids|
holder_counts = LockScript.where(address_id: batch_address_ids).group(:code_hash).count("DISTINCT address_id")
lock_script_ids = Address.where(id: batch_address_ids).map(&:lock_script_id).uniq
holder_counts = LockScript.where(id: lock_script_ids).group(:code_hash).count("DISTINCT id")
holder_counts.each do |code_hash, count|
allocation_data[code_hash] ||= 0
allocation_data[code_hash] += count
Expand Down

0 comments on commit 0526036

Please sign in to comment.