bitcoin: If we fail to estimate the fee in testnet use the minfee

When developing in regtest or testnet it is really inconvenient to
have to fake traffic and generate blocks just to get estimatesmartfee
to return a valid estimate. This just sets the minfee if bitcoind
doesn't return a valid estimate.

Reported-by: Rene Pickhardt <@renepickhardt>
Signed-off-by: Christian Decker <@cdecker>
This commit is contained in:
Christian Decker
2018-10-22 21:36:08 +02:00
committed by Rusty Russell
parent 40943c9867
commit 46b2e7502c
2 changed files with 16 additions and 0 deletions

View File

@@ -864,6 +864,7 @@ def test_ipv4_and_ipv6(node_factory):
assert int(bind[0]['port']) == port
@unittest.skipIf(not DEVELOPER, "Without DEVELOPER=1 we snap to FEERATE_FLOOR on testnets")
def test_feerates(node_factory):
l1 = node_factory.get_node(options={'log-level': 'io'}, start=False)
l1.daemon.rpcproxy.mock_rpc('estimatesmartfee', {