Skip to content

Commit 545bb34

Browse files
committed
Fixed merge conflict with master
2 parents 1eff91b + 5b80d40 commit 545bb34

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
10221022

10231023
// Only accept connections from discouraged peers if our inbound slots aren't (almost) full.
10241024
bool discouraged = m_banman->IsDiscouraged(addr);
1025-
if (!NetPermissions::HasFlag(permissionFlags, NetPermissionFlags::PF_NOBAN) && nInbound + 1 >= nMaxInbound && discouraged)
1025+
if (!NetPermissions::HasFlag(permissionFlags, NetPermissionFlags::PF_NOBAN) && nInbound + 1 >= nMaxInbound && discouraged)
10261026
{
10271027
LogPrint(BCLog::NET, "connection from %s dropped (discouraged)\n", addr.ToString());
10281028
CloseSocket(hSocket);

src/net_processing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ void Misbehaving(NodeId pnode, int howmuch, const std::string& message) EXCLUSIV
10331033
if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
10341034
{
10351035
LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d) DISCOURAGE THRESHOLD EXCEEDED%s\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior, message_prefixed);
1036-
state->m_should_discourage = true;
1036+
state->m_should_discourage = true;
10371037
} else
10381038
LogPrint(BCLog::NET, "%s: %s peer=%d (%d -> %d)%s\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior, message_prefixed);
10391039
}
@@ -3574,12 +3574,12 @@ bool PeerLogicValidation::MaybeDiscourageAndDisconnect(CNode& pnode)
35743574
LogPrintf("Warning: not punishing whitelisted peer %s!\n", pnode.addr.ToString());
35753575
} else if (pnode.m_manual_connection) {
35763576
LogPrintf("Warning: not punishing manually-connected peer %s!\n", pnode.addr.ToString());
3577-
} else if (pnode.addr.IsLocal()) {
3577+
} else if (pnode.addr.IsLocal()) {
35783578
// Disconnect but don't discourage this local node
35793579
LogPrintf("Warning: disconnecting but not discouraging local peer %s!\n", pnode.addr.ToString());
35803580
pnode.fDisconnect = true;
3581-
} else {
3582-
// Disconnect and discourage all nodes sharing the address
3581+
} else {
3582+
// Disconnect and discourage all nodes sharing the address
35833583
LogPrintf("Disconnecting and discouraging peer %s!\n", pnode.addr.ToString());
35843584
if (m_banman) {
35853585
m_banman->Discourage(pnode.addr);

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ UniValue dumptxoutset(const JSONRPCRequest& request)
23232323

23242324
::ChainstateActive().ForceFlushStateToDisk();
23252325

2326-
if (!GetUTXOStats(&::ChainstateActive().CoinsDB(), stats, CoinStatsHashType::NONE, RpcInterruptionPoint)) {
2326+
if (!GetUTXOStats(&::ChainstateActive().CoinsDB(), stats, CoinStatsHashType::NONE, RpcInterruptionPoint)) {
23272327
throw JSONRPCError(RPC_INTERNAL_ERROR, "Unable to read UTXO set");
23282328
}
23292329

src/rpc/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ CoinStatsHashType ParseHashType(const UniValue& param, const CoinStatsHashType d
123123
if (hash_type_input == "hash_serialized_2") {
124124
return CoinStatsHashType::HASH_SERIALIZED;
125125
} else if (hash_type_input == "none") {
126-
return CoinStatsHashType::NONE;
126+
return CoinStatsHashType::NONE;
127127
} else {
128128
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("%d is not a valid hash_type", hash_type_input));
129129
}

src/test/denialofservice_tests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
344344
LOCK2(cs_main, dummyNode.cs_sendProcessing);
345345
BOOST_CHECK(peerLogic->SendMessages(&dummyNode));
346346
}
347-
348-
BOOST_CHECK(banman->IsDiscouraged(addr));
347+
BOOST_CHECK(banman->IsDiscouraged(addr));
349348

350349
bool dummy;
351350
peerLogic->FinalizeNode(dummyNode.GetId(), dummy);

0 commit comments

Comments
 (0)