@@ -376,17 +376,14 @@ struct CNodeState {
376
376
// ! Whether this peer is an inbound connection
377
377
bool m_is_inbound;
378
378
379
- // ! Whether this peer is a manual connection
380
- bool m_is_manual_connection;
381
-
382
379
// ! A rolling bloom filter of all announced tx CInvs to this peer.
383
380
CRollingBloomFilter m_recently_announced_invs = CRollingBloomFilter{INVENTORY_MAX_RECENT_RELAY, 0.000001 };
384
381
385
382
// ! Whether this peer relays txs via wtxid
386
383
bool m_wtxid_relay{false };
387
384
388
- CNodeState (CAddress addrIn, bool is_inbound, bool is_manual )
389
- : address(addrIn), m_is_inbound(is_inbound), m_is_manual_connection(is_manual)
385
+ CNodeState (CAddress addrIn, bool is_inbound)
386
+ : address(addrIn), m_is_inbound(is_inbound)
390
387
{
391
388
pindexBestKnownBlock = nullptr ;
392
389
hashLastUnknownBlock.SetNull ();
@@ -754,7 +751,7 @@ void PeerManager::InitializeNode(CNode *pnode) {
754
751
NodeId nodeid = pnode->GetId ();
755
752
{
756
753
LOCK (cs_main);
757
- mapNodeState.emplace_hint (mapNodeState.end (), std::piecewise_construct, std::forward_as_tuple (nodeid), std::forward_as_tuple (addr, pnode->IsInboundConn (), pnode-> IsManualConn () ));
754
+ mapNodeState.emplace_hint (mapNodeState.end (), std::piecewise_construct, std::forward_as_tuple (nodeid), std::forward_as_tuple (addr, pnode->IsInboundConn ()));
758
755
assert (m_txrequest.Count (nodeid) == 0 );
759
756
}
760
757
{
@@ -1054,8 +1051,8 @@ bool PeerManager::MaybePunishNodeForBlock(NodeId nodeid, const BlockValidationSt
1054
1051
}
1055
1052
1056
1053
// Discourage outbound (but not inbound) peers if on an invalid chain.
1057
- // Exempt HB compact block peers and manual connections.
1058
- if (!via_compact_block && !node_state->m_is_inbound && !node_state-> m_is_manual_connection ) {
1054
+ // Exempt HB compact block peers. Manual connections are always protected from discouragement .
1055
+ if (!via_compact_block && !node_state->m_is_inbound ) {
1059
1056
Misbehaving (nodeid, 100 , message);
1060
1057
return true ;
1061
1058
}
0 commit comments