MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_opening_incoming_unknown_feerates

Function test_opening_incoming_unknown_feerates

tests/test_opening.py:3587–3607  ·  view source on GitHub ↗

Don't allow incoming channels if we can't estimate feerates.

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

3585@pytest.mark.openchannel('v1')
3586@pytest.mark.openchannel('v2')
3587def test_opening_incoming_unknown_feerates(node_factory, bitcoind):
3588 """
3589 Don't allow incoming channels if we can't estimate feerates.
3590 """
3591 nofee_opts = {'ignore-fee-limits': True,
3592 'feerates': None,
3593 'dev-no-fake-fees': True}
3594
3595 l1, l2 = node_factory.get_nodes(2, opts=[{}, nofee_opts])
3596
3597 l1.fundwallet(FUNDAMOUNT)
3598
3599 # Connect peers
3600 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
3601
3602 # Verify fee estimation is failing
3603 l2.daemon.wait_for_log('Unable to estimate any fees')
3604
3605 # Open channel l1 <-> l2: l2 should refuse!
3606 with pytest.raises(RpcError, match=r'They sent.*Cannot accept channel: feerates unknown'):
3607 l1.rpc.fundchannel(l2.info['id'], 100000)
3608
3609
3610def test_zeroconf_withhold_htlc_failback(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 5

get_nodesMethod · 0.80
fundwalletMethod · 0.80
wait_for_logMethod · 0.80
connectMethod · 0.45
fundchannelMethod · 0.45

Tested by

no test coverage detected