onchaind: cap RBF penalty fee for testnet/regtest

On testnet I noticed if we can't reach bitcoind for some reason, we'll
keep RBFing our penalty tx ("it didn't go in, RBF harder!!").  Makes
no sense to grossly exceed the amount needed for next block, so simply
cap penalty at 2x "estimatesmartfee 2 CONSERVATIVE".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-11-18 20:35:59 +10:30
committed by Christian Decker
parent 9e41754e7d
commit f2291c44d6
6 changed files with 32 additions and 15 deletions

View File

@@ -1668,7 +1668,9 @@ def test_penalty_rbf_burn(node_factory, bitcoind, executor, chainparams):
may_fail=True, allow_broken_log=True)
l2 = node_factory.get_node(options={'dev-disable-commit-after': 1,
'watchtime-blocks': to_self_delay,
'plugin': coin_mvt_plugin})
'plugin': coin_mvt_plugin},
# Exporbitant feerates mean we don't have cap on RBF!
feerates=(15000000, 11000, 7500, 3750))
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
l1.fundchannel(l2, 10**7)