From 220839fc7c51957986abf1194aae9fbc7e2c0bb7 Mon Sep 17 00:00:00 2001 From: zhangyaning Date: Tue, 28 Oct 2025 17:59:44 +0800 Subject: [PATCH] fix_bitcoin_transaction_detect_worker (#2897) --- app/workers/bitcoin_transaction_detect_worker.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/workers/bitcoin_transaction_detect_worker.rb b/app/workers/bitcoin_transaction_detect_worker.rb index 1c0cef20a..c70340cd7 100644 --- a/app/workers/bitcoin_transaction_detect_worker.rb +++ b/app/workers/bitcoin_transaction_detect_worker.rb @@ -13,6 +13,7 @@ def perform(number) @txids = [] # bitcoin txids @rgbpp_cell_ids = [] # rgbpp cells @btc_time_cell_ids = [] # btc time cells + @ckb_txids = [] ApplicationRecord.transaction do 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) ).exists? @rgbpp_cell_ids << cell_output_id @txids << txid + @ckb_txids << cell_output.ckb_transaction_id end end @@ -60,6 +62,7 @@ def collect_rgb_ids(cell_output) ).exists? @btc_time_cell_ids << cell_output_id @txids << txid + @ckb_txids << cell_output.ckb_transaction_id end end end @@ -91,7 +94,7 @@ def cache_raw_transactions! def build_bitcoin_annotations! annotations = [] - @block.ckb_transactions.where(id: @txids).each do |transaction| + @block.ckb_transactions.where(id: @ckb_txids).each do |transaction| leap_direction, transfer_step = annotation_workflow_attributes(transaction) tags = annotation_tags(transaction)