MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.86k stars 840 forks source link

Support for `feefilter` message #1135

Closed torx-cz closed 1 year ago

torx-cz commented 1 year ago

I would like to use (de)serialization of NBitcoin library for feefilter message. However I found out, that it is not present in supported messages (no FeeFilterPayload type) in NBitcoin. So I suggest to add support for feefilter message.

FeeFilter message was added in Bitcoin Core 0.13 (protocol 70013) and is described in BIP133.

Quote from BIP133 specification:

  1. Upon receipt of a "feefilter" message, the node will be permitted, but not required, to filter transaction invs for transactions that fall below the feerate provided in the feefilter message interpreted as satoshis per kilobyte.

So from point of view of implementation, it seems pretty straightforward - we do not need to implement real filtering of TX to send.

I can make PR, if you are also interested in this feature.

NicolasDorier commented 1 year ago

@vlada-cz yes, I am interested in a PR for that!