This commit adds a boolean option -peersendreject
, defaulting to 1
, that can be used to disable the sending of BIP61 reject
messages. This functionality has been requested for various reasons:
-
security (DoS): reject messages can reveal internal state that can be used to target certain resources such as the mempool more easily.
-
bandwidth: a typical node sends lots of reject messages; this counts against upstream bandwidth. Also the reject messages tend to be larger than the message that was rejected.
On the other hand, reject messages can be useful while developing client software (I found them indispensable while creating bitcoin-submittx), as well as for our own test cases, so whatever the default becomes on the long run, IMO the functionality should be retained as option. But that’s a discussion for later, for now it’s simply a node operator decision.
Also adds a RPC test that checks the functionality.