Notifying peers of relay preferences
Currently, block-relay-only connections are established indirectly:
-
When making an outbound block-relay-only connection, a node sets the boolean flag
fRelayin the version message tofalse. -
fRelay(introduced in the context of BIP 37) does not imply that transactions cannot be sent for the entire duration of the connection - in its original use case with BIP37, relay of transactions can be activated later on. -
fRelay=falseis also used in -blocksonly mode, a low-bandwidth option in which a node does not want to receive transactions from any peer, but does participate in address relay.
Therefore, nodes currently don’t have a notion which of their incoming peers see the connection as block-relay-only and don’t have any logic attached to it.