mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
[net processing] Add internal _RelayTransactions()
Callers of the external RelayTransactions() no longer need to lock cs_main.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
#define BITCOIN_NET_PROCESSING_H
|
||||
|
||||
#include <net.h>
|
||||
#include <sync.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
class CAddrMan;
|
||||
@@ -15,8 +14,6 @@ class CChainParams;
|
||||
class CTxMemPool;
|
||||
class ChainstateManager;
|
||||
|
||||
extern RecursiveMutex cs_main;
|
||||
|
||||
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
|
||||
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
|
||||
/** Default number of orphan+recently-replaced txn to keep around for block reconstruction */
|
||||
@@ -49,8 +46,7 @@ public:
|
||||
virtual bool IgnoresIncomingTxs() = 0;
|
||||
|
||||
/** Relay transaction to all peers. */
|
||||
virtual void RelayTransaction(const uint256& txid, const uint256& wtxid)
|
||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) = 0;
|
||||
virtual void RelayTransaction(const uint256& txid, const uint256& wtxid) = 0;
|
||||
|
||||
/** Send ping message to all peers */
|
||||
virtual void SendPings() = 0;
|
||||
|
||||
Reference in New Issue
Block a user