refactor: Make ProcessMessage private again
It is not used in tests anymore.
This commit is contained in:
2 files changed
+4
-7
No files matched your search
@@ -551,13 +551,14 @@ public:
|
|||||||
m_best_block_time = time;
|
m_best_block_time = time;
|
||||||
};
|
};
|
||||||
void UnitTestMisbehaving(NodeId peer_id) override EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex) { Misbehaving(*Assert(GetPeerRef(peer_id)), ""); };
|
void UnitTestMisbehaving(NodeId peer_id) override EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex) { Misbehaving(*Assert(GetPeerRef(peer_id)), ""); };
|
||||||
void ProcessMessage(CNode& pfrom, const std::string& msg_type, DataStream& vRecv,
|
|
||||||
std::chrono::microseconds time_received, const std::atomic<bool>& interruptMsgProc) override
|
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, !m_most_recent_block_mutex, !m_headers_presync_mutex, g_msgproc_mutex, !m_tx_download_mutex);
|
|
||||||
void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds) override;
|
void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds) override;
|
||||||
ServiceFlags GetDesirableServiceFlags(ServiceFlags services) const override;
|
ServiceFlags GetDesirableServiceFlags(ServiceFlags services) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void ProcessMessage(CNode& pfrom, const std::string& msg_type, DataStream& vRecv, std::chrono::microseconds time_received,
|
||||||
|
const std::atomic<bool>& interruptMsgProc)
|
||||||
|
EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, !m_most_recent_block_mutex, !m_headers_presync_mutex, g_msgproc_mutex, !m_tx_download_mutex);
|
||||||
|
|
||||||
/** Consider evicting an outbound peer based on the amount of time they've been behind our tip */
|
/** Consider evicting an outbound peer based on the amount of time they've been behind our tip */
|
||||||
void ConsiderEviction(CNode& pto, Peer& peer, std::chrono::seconds time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
|
void ConsiderEviction(CNode& pto, Peer& peer, std::chrono::seconds time_in_seconds) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
|
||||||
|
|
||||||
|
|||||||
@@ -147,10 +147,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual void CheckForStaleTipAndEvictPeers() = 0;
|
virtual void CheckForStaleTipAndEvictPeers() = 0;
|
||||||
|
|
||||||
/** Process a single message from a peer. Public for fuzz testing */
|
|
||||||
virtual void ProcessMessage(CNode& pfrom, const std::string& msg_type, DataStream& vRecv,
|
|
||||||
std::chrono::microseconds time_received, const std::atomic<bool>& interruptMsgProc) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex) = 0;
|
|
||||||
|
|
||||||
/** This function is used for testing the stale tip eviction logic, see denialofservice_tests.cpp */
|
/** This function is used for testing the stale tip eviction logic, see denialofservice_tests.cpp */
|
||||||
virtual void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds) = 0;
|
virtual void UpdateLastBlockAnnounceTime(NodeId node, int64_t time_in_seconds) = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user