Skip to content

Commit 591182f

Browse files
authored
fix: pending tx may exist same committed tx (#2451)
Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
1 parent 15b0bde commit 591182f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/workers/pool_transaction_check_worker.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ class PoolTransactionCheckWorker
66

77
def perform
88
pending_transactions = CkbTransaction.tx_pending.where("created_at < ?",
9-
5.minutes.ago).limit(100)
9+
10.minutes.ago).limit(100)
1010
pending_transactions.each do |tx|
1111
committed_tx = CkbTransaction.find_by(tx_hash: tx.tx_hash, tx_status: "committed")
12-
if committed_tx
12+
if committed_tx && tx.reload.tx_pending?
1313
tx.cell_inputs.delete_all
1414
tx.delete
1515
else

0 commit comments

Comments
 (0)