net_processing: store transactions for private broadcast in PeerManager

Extend `PeerManager` with a transaction storage and a new method
`InitiateTxBroadcastPrivate()` which:
* adds a transaction to that storage and
* calls `CConnman::PrivateBroadcast::NumToOpenAdd()` to open dedicated
  privacy connections that will pick an entry from the transaction
  storage and broadcast it.
This commit is contained in:
Vasil Dimov
2024-01-30 10:01:24 +01:00
parent a3faa6f944
commit 679ce3a0b8
6 changed files with 104 additions and 0 deletions

View File

@@ -139,6 +139,7 @@ TransactionError BroadcastTransaction(NodeContext& node,
node.peerman->InitiateTxBroadcastToAll(txid, wtxid);
break;
case TxBroadcast::NO_MEMPOOL_PRIVATE_BROADCAST:
node.peerman->InitiateTxBroadcastPrivate(tx);
break;
}