Store a list of transactions to be broadcast privately. Supports the following operations: ‐ Add a new transaction ‐ Remove a transaction ‐ Pick a transaction for sending to one recipient ‐ Query which transaction has been picked for sending to a given recipient node ‐ Mark that a given recipient node has confirmed receipt of a transaction ‐ Query whether a given recipient node has confirmed reception ‐ Query whether any transactions that need sending are currently on the list
Synopsis
Declared in <private_broadcast.h>
class PrivateBroadcast;
Types
Name |
Description |
Per‐recipient record of when a transaction was sent and (optionally) received back. |
|
Public snapshot of a tracked transaction and its per‐peer broadcast history. |
Enums
Name |
Description |
Outcome of Add(). |
Member Functions
Name |
Description |
|
Construct a private broadcast store with optional capacity limits. |
Add a transaction to the storage, or reset an exhausted transaction so it can be broadcast again. |
|
Check if the node has confirmed reception of the transaction. |
|
Get stats about all transactions currently being privately broadcast. |
|
Get the transactions that have not been broadcast recently and have send attempts remaining. |
|
Get the transaction that was picked for sending to a given node by PickTxForSend(). |
|
Check if there are transactions with send attempts remaining. |
|
Mark that the node has confirmed reception of the transaction we sent it by responding with |
|
Pick the transaction with the fewest send attempts, and confirmations, and oldest send/confirm times. |
|
Forget a transaction. |
Static Data Members
Name |
Description |
If a transaction is not sent to any peer for this duration, then we consider it stale / for rebroadcasting. |
|
Maximum number of send attempts for a transaction. Once this limit is reached, the transaction remains tracked but is not sent again unless explicitly re‐added. |
|
Maximum number of transactions tracked simultaneously. Additions that would exceed this are rejected (see Add()). |
|
If a transaction is not received back from the network for this duration after it is broadcast, then we consider it stale / for rebroadcasting. |
Created with MrDocs