a7a43e8fe8 Factor feefilter logic out (amadeuszpawlik)
c0385f10a1 Remove -feefilter option (amadeuszpawlik)
Pull request description:
net: Remove -feefilter option, as it is debug only and isn't used in any tests. Checking this option for every peer on every iteration of the message handler is unnecessary, as described in #21545.
refactor: Move feefilter logic out into a separate `MaybeSendFeefilter(...)` function to improve readability of the already long `SendMessages(...)`. fixes #21545
The configuration option `-feefilter` has been added in 9e072a6e66efbda7d39bf61eded21d2b324323be: _"Implement "feefilter" P2P message"_
According to the [BIP133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki), turning the fee filter off was ment for:
> [...] a node [...] using prioritisetransaction to accept transactions whose actual fee rates might fall below the node's mempool min fee [in order to] disable the fee filter to make sure it is exposed to all possible txid's
`-feefilter` was subsequently set as debug only in #8150, with the motivation that the help message was too difficult to translate.
ACKs for top commit:
jnewbery:
Code review ACK a7a43e8fe8
promag:
Code review ACK a7a43e8fe8.
MarcoFalke:
review ACK a7a43e8fe8🦁
Tree-SHA512: 8ef9a2f255597c0279d3047dcc968fd30fb7402e981b69206d08eed452c705ed568c24e646e98d06eac118eddd09205b584f45611d1c874abf38f48b08b67630
argsman.AddArg("-datadir=<dir>","Specify data directory",ArgsManager::ALLOW_ANY,OptionsCategory::OPTIONS);
argsman.AddArg("-dbbatchsize",strprintf("Maximum database write batch size in bytes (default: %u)",nDefaultDbBatchSize),ArgsManager::ALLOW_ANY|ArgsManager::DEBUG_ONLY,OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>",strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). In addition, unused mempool memory is shared for this cache (see -maxmempool).",nMinDbCache,nMaxDbCache,nDefaultDbCache),ArgsManager::ALLOW_ANY,OptionsCategory::OPTIONS);
argsman.AddArg("-feefilter",strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)",DEFAULT_FEEFILTER),ArgsManager::ALLOW_ANY|ArgsManager::DEBUG_ONLY,OptionsCategory::OPTIONS);
argsman.AddArg("-includeconf=<file>","Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line)",ArgsManager::ALLOW_ANY,OptionsCategory::OPTIONS);
argsman.AddArg("-loadblock=<file>","Imports blocks from external file on startup",ArgsManager::ALLOW_ANY,OptionsCategory::OPTIONS);
argsman.AddArg("-maxmempool=<n>",strprintf("Keep the transaction memory pool below <n> megabytes (default: %u)",DEFAULT_MAX_MEMPOOL_SIZE),ArgsManager::ALLOW_ANY,OptionsCategory::OPTIONS);