@@ -464,7 +464,7 @@ class PeerManagerImpl final : public PeerManager
464
464
void SendBlockTransactions (CNode& pfrom, const CBlock& block, const BlockTransactionsRequest& req);
465
465
466
466
/* * Send a version message to a peer */
467
- void PushNodeVersion (CNode& pnode, Peer& peer);
467
+ void PushNodeVersion (CNode& pnode, const Peer& peer);
468
468
469
469
/* * Send a ping message every PING_INTERVAL or if requested via RPC. May
470
470
* mark the peer to be disconnected if a ping has timed out.
@@ -1215,7 +1215,7 @@ void PeerManagerImpl::FindNextBlocksToDownload(NodeId nodeid, unsigned int count
1215
1215
}
1216
1216
} // namespace
1217
1217
1218
- void PeerManagerImpl::PushNodeVersion (CNode& pnode, Peer& peer)
1218
+ void PeerManagerImpl::PushNodeVersion (CNode& pnode, const Peer& peer)
1219
1219
{
1220
1220
const auto & params = Params ();
1221
1221
@@ -3369,8 +3369,10 @@ void PeerManagerImpl::ProcessMessage(
3369
3369
pfrom.m_limited_node = (!(nServices & NODE_NETWORK) && (nServices & NODE_NETWORK_LIMITED));
3370
3370
3371
3371
if (!pfrom.IsBlockOnlyConn ()) {
3372
- LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
3373
- peer->m_tx_relay ->m_relay_txs = fRelay ; // set to true after we get the first filter* message
3372
+ {
3373
+ LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
3374
+ peer->m_tx_relay ->m_relay_txs = fRelay ; // set to true after we get the first filter* message
3375
+ }
3374
3376
if (fRelay ) pfrom.m_relays_txs = true ;
3375
3377
}
3376
3378
@@ -4687,10 +4689,12 @@ void PeerManagerImpl::ProcessMessage(
4687
4689
}
4688
4690
else if (!pfrom.IsBlockOnlyConn ())
4689
4691
{
4690
- LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
4691
- peer->m_tx_relay ->m_bloom_filter .reset (new CBloomFilter (filter));
4692
+ {
4693
+ LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
4694
+ peer->m_tx_relay ->m_bloom_filter .reset (new CBloomFilter (filter));
4695
+ peer->m_tx_relay ->m_relay_txs = true ;
4696
+ }
4692
4697
pfrom.m_bloom_filter_loaded = true ;
4693
- peer->m_tx_relay ->m_relay_txs = true ;
4694
4698
pfrom.m_relays_txs = true ;
4695
4699
}
4696
4700
return ;
@@ -4733,10 +4737,13 @@ void PeerManagerImpl::ProcessMessage(
4733
4737
if (pfrom.IsBlockOnlyConn ()) {
4734
4738
return ;
4735
4739
}
4736
- LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
4737
- peer->m_tx_relay ->m_bloom_filter = nullptr ;
4740
+
4741
+ {
4742
+ LOCK (peer->m_tx_relay ->m_bloom_filter_mutex );
4743
+ peer->m_tx_relay ->m_bloom_filter = nullptr ;
4744
+ peer->m_tx_relay ->m_relay_txs = true ;
4745
+ }
4738
4746
pfrom.m_bloom_filter_loaded = false ;
4739
- peer->m_tx_relay ->m_relay_txs = true ;
4740
4747
pfrom.m_relays_txs = true ;
4741
4748
return ;
4742
4749
}
0 commit comments