Skip to content

Commit

Permalink
chore: log output cell id
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Aug 1, 2023
1 parent db3c409 commit 5a1a312
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tasks/migration/update_output_cells_status.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class UpdateCellOutputsStatus
task update_output_cells_status: :environment do
ApplicationRecord.transaction do
CellOutput.pending.includes(:ckb_transaction).where(ckb_transaction: { tx_status: "committed" }).find_each do |output|
puts "output id: #{output.id}"

output.live!
update_udt_account(output)
@address_ids << output.address_id
Expand Down Expand Up @@ -44,6 +46,8 @@ class UpdateCellOutputsStatus
if udt_account.present?
udt_account.update(amount: amount)
else
puts "udt_account not: #{udt_output.id}"

udt = Udt.where(type_hash: udt_output.type_hash, udt_type: udt_type).select(:id, :udt_type, :full_name,
:symbol, :decimal, :published, :code_hash, :type_hash, :created_at).take!
nft_token_id =
Expand Down

0 comments on commit 5a1a312

Please sign in to comment.