This PR adds missing test coverage for the -blockmintxfee
option, which can be used by miners to specify the lowest fee-rate for transactions to be included in blocks. The setting was introduced in PR #9380 (commit daec955fd68bd0da036a5b446b54ffb01108adcd), with the rationale to decouple different minimum fees from -minrelaytxfee
. According to the PR description it “should be set by miners to reflect their marginal cost of transmitting extra bytes.”.
On each iteration, the test creates and submits two txs using MiniWallet: one with the the minimum fee-rate as specified for -blockmintxfee
and a second one with a fee-rate a little below that (-0.01 sats/vbyte). Then it checks that only the first one is picked for the block template and accordingly also only exists in the block that is mined after. This is repeatedly done for a fixed (but obviously somewhat arbitrary) list of different -blockmintxfee
settings on a single node, including the default and zero (i.e. no minimum fee a.k.a. “include even zero-fee txs”) settings.