Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fee(rate) mismatch between min relay and fee filter #16499
I was messing around with min relay policies and found that under certain circumstances the mempool will accept things, then not relay to any peers.
Example made using wallet:
and lets it into mempool
but in net_processing.cpp:
this gets hit because the computed feerate is insufficient(printing I added):
I'm not super at arithmetic so I'm opening this up in case someone has an easy fix.
let me also get a reproducible test failure with this...
Ok it's pretty straight-forward:
Whenever you have a feerate in satoshis per kvB that's not divisible by
Applying this fix means that previously-accepted things into mempool are no longer accepted, but these transactions won't propagate anyways, so I think it's fairly conservative.
…stored rate eb7b781 modify p2p_feefilter test to catch rounding error (Gregory Sanders) 6a51f79 Disallow implicit conversion for CFeeRate constructor (Gregory Sanders) 8e59af5 feefilter: Compute the absolute fee rather than stored rate to match mempool acceptance logic (Gregory Sanders) Pull request description: This means we will use the rounding-down behavior in `GetFee` to match both mempool acceptance and wallet logic, with minimal changes. Fixes bitcoin#16499 Replacement PR for bitcoin#16500 ACKs for top commit: ajtowns: ACK eb7b781 code review only naumenkogs: utACK eb7b781 achow101: re ACK eb7b781 promag: ACK eb7b781. Tree-SHA512: 484a11c8f0e825f0c983b1f7e71cf6252b1bba6858194abfe4c088da3bae8a418ec539ef6c4181bf30940e277a95c08d493595d59dfcc6ddf77c65b05563dd7e