mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
Minor cleanups.
1. connect convenience variable for improved readabilty. 2. a comment explaining that timer is on channel, not HTLC. 3. use modern python style in test_htlc_send_timeout Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
63e4ea17af
commit
65c882ca3a
@@ -807,15 +807,16 @@ def test_htlc_send_timeout(node_factory, bitcoind):
|
||||
# tries to ping before sending WIRE_COMMITMENT_SIGNED.
|
||||
time.sleep(30)
|
||||
inv = l3.rpc.invoice(123000, 'test_htlc_send_timeout', 'description')
|
||||
try:
|
||||
with pytest.raises(RpcError) as excinfo:
|
||||
l1.rpc.pay(inv['bolt11'])
|
||||
except RpcError as err:
|
||||
# Complaints it couldn't find route.
|
||||
assert err.error['code'] == 205
|
||||
# Temporary channel failure
|
||||
assert only_one(err.error['data']['failures'])['failcode'] == 0x1007
|
||||
assert only_one(err.error['data']['failures'])['erring_node'] == l2.info['id']
|
||||
assert only_one(err.error['data']['failures'])['erring_channel'] == chanid2
|
||||
|
||||
err = excinfo.value
|
||||
# Complaints it couldn't find route.
|
||||
assert err.error['code'] == 205
|
||||
# Temporary channel failure
|
||||
assert only_one(err.error['data']['failures'])['failcode'] == 0x1007
|
||||
assert only_one(err.error['data']['failures'])['erring_node'] == l2.info['id']
|
||||
assert only_one(err.error['data']['failures'])['erring_channel'] == chanid2
|
||||
|
||||
# L1 should send a ping beforehand, and get reply, then send commitment.
|
||||
l1.daemon.wait_for_log('channeld.*:\[OUT\] 0012')
|
||||
|
||||
Reference in New Issue
Block a user