Skip to content

Commit 220839f

Browse files
authored
fix_bitcoin_transaction_detect_worker (#2897)
1 parent fbe3049 commit 220839f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/workers/bitcoin_transaction_detect_worker.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def perform(number)
1313
@txids = [] # bitcoin txids
1414
@rgbpp_cell_ids = [] # rgbpp cells
1515
@btc_time_cell_ids = [] # btc time cells
16+
@ckb_txids = []
1617

1718
ApplicationRecord.transaction do
1819
block.ckb_transactions.includes(input_cells: [:lock_script], cell_outputs: [:lock_script]).each do |transaction|
@@ -48,6 +49,7 @@ def collect_rgb_ids(cell_output)
4849
).exists?
4950
@rgbpp_cell_ids << cell_output_id
5051
@txids << txid
52+
@ckb_txids << cell_output.ckb_transaction_id
5153
end
5254
end
5355

@@ -60,6 +62,7 @@ def collect_rgb_ids(cell_output)
6062
).exists?
6163
@btc_time_cell_ids << cell_output_id
6264
@txids << txid
65+
@ckb_txids << cell_output.ckb_transaction_id
6366
end
6467
end
6568
end
@@ -91,7 +94,7 @@ def cache_raw_transactions!
9194
def build_bitcoin_annotations!
9295
annotations = []
9396

94-
@block.ckb_transactions.where(id: @txids).each do |transaction|
97+
@block.ckb_transactions.where(id: @ckb_txids).each do |transaction|
9598
leap_direction, transfer_step = annotation_workflow_attributes(transaction)
9699
tags = annotation_tags(transaction)
97100

0 commit comments

Comments
 (0)