From 001c4338bfce2886190f25f0758bce0a037d38bf Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Sat, 19 Oct 2019 17:40:29 +0700 Subject: [PATCH] Improved messaging for ip address errors (#3163) --- src/evo/providertx.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/evo/providertx.cpp b/src/evo/providertx.cpp index 7b5038fba..2b33aa9b5 100644 --- a/src/evo/providertx.cpp +++ b/src/evo/providertx.cpp @@ -21,23 +21,23 @@ template static bool CheckService(const uint256& proTxHash, const ProTx& proTx, CValidationState& state) { if (!proTx.addr.IsValid()) { - return state.DoS(10, false, REJECT_INVALID, "bad-protx-addr"); + return state.DoS(10, false, REJECT_INVALID, "bad-protx-ipaddr"); } if (Params().NetworkIDString() != CBaseChainParams::REGTEST && !proTx.addr.IsRoutable()) { - return state.DoS(10, false, REJECT_INVALID, "bad-protx-addr"); + return state.DoS(10, false, REJECT_INVALID, "bad-protx-ipaddr"); } static int mainnetDefaultPort = CreateChainParams(CBaseChainParams::MAIN)->GetDefaultPort(); if (Params().NetworkIDString() == CBaseChainParams::MAIN) { if (proTx.addr.GetPort() != mainnetDefaultPort) { - return state.DoS(10, false, REJECT_INVALID, "bad-protx-addr-port"); + return state.DoS(10, false, REJECT_INVALID, "bad-protx-ipaddr-port"); } } else if (proTx.addr.GetPort() == mainnetDefaultPort) { - return state.DoS(10, false, REJECT_INVALID, "bad-protx-addr-port"); + return state.DoS(10, false, REJECT_INVALID, "bad-protx-ipaddr-port"); } if (!proTx.addr.IsIPv4()) { - return state.DoS(10, false, REJECT_INVALID, "bad-protx-addr"); + return state.DoS(10, false, REJECT_INVALID, "bad-protx-ipaddr"); } return true;