nooschain / tx-gossip/transaction-gossip-service / TransactionGossipService
Class: TransactionGossipService
Defined in: tx-gossip/transaction-gossip-service.ts:51
Coordinates transaction gossip admission, propagation, and peer scoring.
Constructors
Constructor
new TransactionGossipService(
db,options?):TransactionGossipService
Defined in: tx-gossip/transaction-gossip-service.ts:57
Creates a gossip service bound to the node's chain database.
Parameters
db
options?
TransactionGossipServiceOptions = {}
Returns
TransactionGossipService
Methods
acceptRemoteTransaction()
acceptRemoteTransaction(
args):Promise<TransactionPropagationResult>
Defined in: tx-gossip/transaction-gossip-service.ts:71
Accepts a transaction received from another node's gossip endpoint.
The transaction is redacted before local persistence, validated against the normal mempool admission rules, optionally recorded as inbound propagation, and then optionally propagated to other peers.
Parameters
args
protocolVersion?
number
receivedFromPeerId?
string | null
transaction
Returns
Promise<TransactionPropagationResult>
propagateTransaction()
propagateTransaction(
args):Promise<void>
Defined in: tx-gossip/transaction-gossip-service.ts:197
Best-effort propagates a pending transaction to active trusted peers.
Peers already marked as having received this transaction are skipped. Peers whose local score status is quarantined or banned are also skipped so gossip respects operator/peer-scoring safety decisions.
Parameters
args
excludePeerId?
string
protocolVersion?
number
transaction
Returns
Promise<void>