mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
rpc: Add abortprivatebroadcast
Co-authored-by: l0rinc <pap.lorinc@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <private_broadcast.h>
|
||||
#include <protocol.h>
|
||||
#include <threadsafety.h>
|
||||
#include <uint256.h>
|
||||
#include <util/expected.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
@@ -122,6 +123,18 @@ public:
|
||||
/** Get info about transactions currently being privately broadcast. */
|
||||
virtual std::vector<PrivateBroadcast::TxBroadcastInfo> GetPrivateBroadcastInfo() const = 0;
|
||||
|
||||
/**
|
||||
* Abort private broadcast attempts for transactions currently being privately broadcast.
|
||||
*
|
||||
* @param[in] id A transaction identifier. It will be matched against both txid and wtxid for
|
||||
* all transactions in the private broadcast queue.
|
||||
*
|
||||
* @return Transactions removed from the private broadcast queue. If the provided id matches a
|
||||
* txid that corresponds to multiple transactions with different wtxids, multiple
|
||||
* transactions may be returned.
|
||||
*/
|
||||
virtual std::vector<CTransactionRef> AbortPrivateBroadcast(const uint256& id) = 0;
|
||||
|
||||
/**
|
||||
* Initiate a transaction broadcast to eligible peers.
|
||||
* Queue the witness transaction id to `Peer::TxRelay::m_tx_inventory_to_send`
|
||||
|
||||
Reference in New Issue
Block a user