nooschain / chain/mempool / getPendingTransactions
Function: getPendingTransactions()
getPendingTransactions(
database?,limit?):Promise<SignedTransaction[]>
Defined in: chain/mempool.ts:100
Retrieves pending transactions from the mempool, ordered by their insertion time. The function performs a join between the mempool_transactions and transactions tables to fetch the details of transactions that are currently pending. An optional limit can be provided to restrict the number of transactions returned.
Parameters
database?
ChainDatabase = db
The database instance to use for the operation.
limit?
number
An optional limit on the number of transactions to retrieve.
Returns
Promise<SignedTransaction[]>
A promise that resolves to an array of SignedTransaction objects representing the pending transactions.