aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-08-24 16:40:10 +0100
committerJohn Newbery <john@johnnewbery.com>2020-09-07 11:16:12 +0100
commit3115e00f75b41d9765dcbb376e367b25f61a1d58 (patch)
tree9b317b56990980b7074ad6794a77f730e96fe8b9 /src/net_processing.h
parente662e2d42afaf9c67c898634a0f3bc200255b6ea (diff)
[net processing] Move MaybePunishPeerForTx to PeerManager
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 24866efd67..4f350630f1 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -16,6 +16,7 @@ class CBlockHeader;
class CChainParams;
class CTxMemPool;
class ChainstateManager;
+class TxValidationState;
extern RecursiveMutex cs_main;
extern RecursiveMutex g_cs_orphans;
@@ -98,6 +99,13 @@ private:
bool MaybePunishNodeForBlock(NodeId nodeid, const BlockValidationState& state,
bool via_compact_block, const std::string& message = "");
+ /**
+ * Potentially disconnect and discourage a node based on the contents of a TxValidationState object
+ *
+ * @return Returns true if the peer was punished (probably disconnected)
+ */
+ bool MaybePunishNodeForTx(NodeId nodeid, const TxValidationState& state, const std::string& message = "");
+
/** Maybe disconnect a peer and discourage future connections from its address.
*
* @param[in] pnode The node to check.