Page MenuHomePhabricator

[net processing] [refactor] Move m_next_send_feefilter and m_fee_filter_sent
ClosedPublic

Authored by PiRK on Nov 6 2023, 08:39.

Details

Summary

Move m_next_send_feefilter and m_fee_filter_sent out of the TxRelay
data structure. All of the other members of TxRelay are related to
sending transactions _to_ the peer, whereas m_fee_filter_sent and
m_next_send_feefilter are both related to receiving transactions _from_
the peer. A node's tx relay behaviour is not always symmetrical (eg a
blocksonly node will ignore incoming transactions, but may still send
out its own transactions), so it doesn't make sense to group the
feefilter sending data with the TxRelay data in a single structure.

This does not change behaviour, since IsBlockOnlyConn() is always equal
to !peer.m_tx_relay. We still don't send feefilter messages to outbound
block-relay-only peers (tested in p2p_feefilter.py).

This is a partial backport of core#22778
https://github.com/bitcoin/bitcoin/pull/22778/commits/42e3250497b03478d61cd6bfe6cd904de73d57b1

Test Plan

ninja all check-all