mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
channel-lease: reject if we're not currently advertising liquidity
If there's no plugin currently in place, we simply won't return any funding at all, in which case we'd expect them to handle however they want. (our implementation would fail the open, as we only accept opens that have at least as much as we've requested provided)
This commit is contained in:
@@ -26,10 +26,8 @@ def test_queryrates(node_factory, bitcoind):
|
||||
l2.fundwallet(amount * 10)
|
||||
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
result = l1.rpc.queryrates(l2.info['id'], amount, amount * 10)
|
||||
assert result['our_funding_msat'] == Millisatoshi(amount * 1000)
|
||||
assert result['their_funding_msat'] == Millisatoshi(0)
|
||||
assert 'weight_charge' not in result
|
||||
with pytest.raises(RpcError, match=r'not advertising liquidity'):
|
||||
l1.rpc.queryrates(l2.info['id'], amount, amount * 10)
|
||||
|
||||
l2.rpc.call('funderupdate', {'policy': 'match',
|
||||
'policy_mod': 100,
|
||||
|
||||
Reference in New Issue
Block a user