I'm setting up some automated testing for a lightning wallet. At the heart of my tests is a bitcoind instance running in regtest mode. I need to be able to set the fee rate - both the fee rate reported by estimatesmartfee
and the fee rate which transactions need to match in order to get confirmed.
So far, the only way I can see to do this is to mine lots of blocks filled with transactions that have the desired fee rate. I'm doing this by calling sendtoaddress
(via bitcoin-cli) repeatedly in a loop to send small amounts of money into the void. This is painfully slow - it involves generating ~2500 transactions before bitcoind catches the drift that this should be the new reported fee rate. And I have to do this for every test, sometimes multiple times per test, so my CI is taking forever.
I'm wondering if there's any way to avoid doing this. Is there some way to override bitcoind's estimated fee rate and have it refuse to include transactions which pay less than that fee rate when mining blocks? If not, are there any quicker ways to pad out blocks with transactions than what I'm doing?