plugins/bcli: fake minimum fee if we're in regtest mode.

Saves a great deal of confusion for regtest users.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: If bitcoind won't give a fee estimate in regtest, use minimum.
This commit is contained in:
Rusty Russell
2021-03-01 13:02:05 +10:30
parent c78e2cc024
commit 4848c0022f
3 changed files with 28 additions and 2 deletions

View File

@@ -1438,7 +1438,8 @@ def test_ipv4_and_ipv6(node_factory):
"FEERATE_FLOOR on testnets, and we test the new API."
)
def test_feerates(node_factory):
l1 = node_factory.get_node(options={'log-level': 'io'}, start=False)
l1 = node_factory.get_node(options={'log-level': 'io',
'dev-no-fake-fees': True}, start=False)
l1.daemon.rpcproxy.mock_rpc('estimatesmartfee', {
'error': {"errors": ["Insufficient data or no feerate found"], "blocks": 0}
})