aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 2d98714122..74d6603747 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -11,6 +11,7 @@
#include <sync.h>
#include <validationinterface.h>
+class CChainParams;
class CTxMemPool;
class ChainstateManager;
@@ -28,7 +29,7 @@ static const int DISCOURAGEMENT_THRESHOLD{100};
class PeerLogicValidation final : public CValidationInterface, public NetEventsInterface {
private:
- CConnman* const connman;
+ CConnman& m_connman;
/** Pointer to this node's banman. May be nullptr - check existence before dereferencing. */
BanMan* const m_banman;
ChainstateManager& m_chainman;
@@ -37,7 +38,7 @@ private:
bool MaybeDiscourageAndDisconnect(CNode& pnode);
public:
- PeerLogicValidation(CConnman* connman, BanMan* banman, CScheduler& scheduler, ChainstateManager& chainman, CTxMemPool& pool);
+ PeerLogicValidation(CConnman& connman, BanMan* banman, CScheduler& scheduler, ChainstateManager& chainman, CTxMemPool& pool);
/**
* Overridden from CValidationInterface.
@@ -85,8 +86,14 @@ public:
/** Retrieve unbroadcast transactions from the mempool and reattempt sending to peers */
void ReattemptInitialBroadcast(CScheduler& scheduler) const;
+ /** Process a single message from a peer. Public for fuzz testing */
+ void ProcessMessage(CNode& pfrom, const std::string& msg_type, CDataStream& vRecv,
+ const std::chrono::microseconds time_received, const CChainParams& chainparams,
+ const std::atomic<bool>& interruptMsgProc);
+
private:
int64_t m_stale_tip_check_time; //!< Next time to check for stale tip
+
};
struct CNodeStateStats {