Skip to content

nooschain v0.1.0


nooschain / tx-gossip/mempool-admission / cleanupMempoolAgainstChain

Function: cleanupMempoolAgainstChain()

cleanupMempoolAgainstChain(db): Promise<number>

Defined in: tx-gossip/mempool-admission.ts:75

Removes mempool entries that no longer have a chance to be included.

Cleanup covers two cases:

  • transactions whose persisted status is no longer pending, and
  • pending transactions whose nonce is now older than or equal to the signer's current chain nonce.

The returned number is the count of mempool rows deleted.

Parameters

db

ChainDatabase

Returns

Promise<number>

Audience-first NOOSChain documentation.