aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index a416093db1..489ffcdc66 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -961,6 +961,7 @@ void Misbehaving(NodeId pnode, int howmuch, const std::string& message) EXCLUSIV
static bool TxRelayMayResultInDisconnect(const CValidationState& state)
{
+ assert(state.GetDoS() == state.GetDoSForReason());
return (state.GetDoS() > 0);
}
@@ -975,6 +976,7 @@ static bool TxRelayMayResultInDisconnect(const CValidationState& state)
* txs, the peer should not be punished. See BIP 152.
*/
static bool MaybePunishNode(NodeId nodeid, const CValidationState& state, bool via_compact_block, const std::string& message = "") {
+ assert(state.GetDoS() == state.GetDoSForReason());
int nDoS = state.GetDoS();
if (nDoS > 0 && !via_compact_block) {
LOCK(cs_main);