mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Merge bitcoin/bitcoin#26109: rpc, doc: getpeerinfo updates
a3789c700bImprove getpeerinfo pingtime, minping, and pingwait help docs (Jon Atack)df660ddb1cUpdate getpeerinfo/-netinfo/TxRelay#m_relay_txs relaytxes docs (for v24 backport) (Jon Atack)1f448542e7Always return getpeerinfo "minfeefilter" field (for v24 backport) (Jon Atack)9cd6682545Make getpeerinfo field order consistent with its help (for v24 backport) (Jon Atack) Pull request description: Various updates and fixups, mostly targeting v24. Please refer to the commit messages for details. ACKs for top commit: achow101: ACKa3789c700bbrunoerg: ACKa3789c700bvasild: ACKa3789c700bTree-SHA512: b8586a9b83c1b18786b5ac1fc1dba91573c13225fc2cfc8d078f4220967c95056354f6be13327f33b4fcf3e9d5310fa4e1bdc93102cbd6574f956698993a54bf
This commit is contained in:
@@ -271,12 +271,7 @@ struct Peer {
|
||||
|
||||
struct TxRelay {
|
||||
mutable RecursiveMutex m_bloom_filter_mutex;
|
||||
/** Whether the peer wishes to receive transaction announcements.
|
||||
*
|
||||
* This is initially set based on the fRelay flag in the received
|
||||
* `version` message. If initially set to false, it can only be flipped
|
||||
* to true if we have offered the peer NODE_BLOOM services and it sends
|
||||
* us a `filterload` or `filterclear` message. See BIP37. */
|
||||
/** Whether we relay transactions to this peer. */
|
||||
bool m_relay_txs GUARDED_BY(m_bloom_filter_mutex){false};
|
||||
/** A bloom filter for which transactions to announce to the peer. See BIP37. */
|
||||
std::unique_ptr<CBloomFilter> m_bloom_filter PT_GUARDED_BY(m_bloom_filter_mutex) GUARDED_BY(m_bloom_filter_mutex){nullptr};
|
||||
@@ -3252,10 +3247,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
}
|
||||
peer->m_starting_height = starting_height;
|
||||
|
||||
// We only initialize the m_tx_relay data structure if:
|
||||
// - this isn't an outbound block-relay-only connection; and
|
||||
// - fRelay=true or we're offering NODE_BLOOM to this peer
|
||||
// (NODE_BLOOM means that the peer may turn on tx relay later)
|
||||
// We only initialize the Peer::TxRelay m_relay_txs data structure if:
|
||||
// - this isn't an outbound block-relay-only connection, and
|
||||
// - fRelay=true (the peer wishes to receive transaction announcements)
|
||||
// or we're offering NODE_BLOOM to this peer. NODE_BLOOM means that
|
||||
// the peer may turn on transaction relay later.
|
||||
if (!pfrom.IsBlockOnlyConn() &&
|
||||
(fRelay || (peer->m_our_services & NODE_BLOOM))) {
|
||||
auto* const tx_relay = peer->SetTxRelay();
|
||||
|
||||
Reference in New Issue
Block a user