Skip to content

Commit 84ed53e

Browse files
authored
Merge pull request #2899 from nervosnetwork/testnet
Deploy to mainnet
2 parents ad88d6b + 885bb32 commit 84ed53e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/workers/bitcoin_transaction_detect_worker.rb

Lines changed: 6 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,8 @@ 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
53+
@ckb_txids << cell_output.consumed_by_id
5154
end
5255
end
5356

@@ -60,6 +63,8 @@ def collect_rgb_ids(cell_output)
6063
).exists?
6164
@btc_time_cell_ids << cell_output_id
6265
@txids << txid
66+
@ckb_txids << cell_output.ckb_transaction_id
67+
@ckb_txids << cell_output.consumed_by_id
6368
end
6469
end
6570
end
@@ -91,7 +96,7 @@ def cache_raw_transactions!
9196
def build_bitcoin_annotations!
9297
annotations = []
9398

94-
@block.ckb_transactions.where(id: @txids).each do |transaction|
99+
@block.ckb_transactions.where(id: @ckb_txids).each do |transaction|
95100
leap_direction, transfer_step = annotation_workflow_attributes(transaction)
96101
tags = annotation_tags(transaction)
97102

0 commit comments

Comments
 (0)