Skip to content

Commit

Permalink
feat: filter pending transactions without missing inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz committed Aug 23, 2023
1 parent 1a94f50 commit 25f66d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/api/v2/pending_transactions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class PendingTransactionsController < BaseController
before_action :set_page_and_page_size

def index
pending_transactions = CkbTransaction.tx_pending
pending_transactions = CkbTransaction.tx_pending.includes(:cell_inputs).
where.not(cell_inputs: { previous_cell_output_id: nil, from_cell_base: false })

if stale?(pending_transactions)
expires_in 10.seconds, public: true, must_revalidate: true, stale_while_revalidate: 5.seconds
Expand Down

0 comments on commit 25f66d6

Please sign in to comment.