@ -1631,9 +1631,9 @@ class LightningDTests(BaseLightningDTests):
# Takes 6 blocks to timeout (cltv-final + 1), but we also give grace period of 1 block.
# Takes 6 blocks to timeout (cltv-final + 1), but we also give grace period of 1 block.
bitcoind . rpc . generate ( 5 + 1 )
bitcoind . rpc . generate ( 5 + 1 )
assert not l1 . daemon . is_in_log ( ' hit deadline ' )
assert not l1 . daemon . is_in_log ( ' hit deadline ' )
bitcoind . rpc . generate ( 1 )
bitcoind . rpc . generate ( 2 )
l1 . daemon . wait_for_log ( ' Offered HTLC 0 SENT_ADD_ACK_REVOCATION cltv {} hit deadline ' . format ( bitcoind . rpc . getblockcount ( ) - 1 ) )
l1 . daemon . wait_for_log ( ' Offered HTLC 0 SENT_ADD_ACK_REVOCATION cltv .* hit deadline ' )
l1 . daemon . wait_for_log ( ' sendrawtx exit 0 ' )
l1 . daemon . wait_for_log ( ' sendrawtx exit 0 ' )
l1 . bitcoin . rpc . generate ( 1 )
l1 . bitcoin . rpc . generate ( 1 )
l1 . daemon . wait_for_log ( ' -> ONCHAIND_OUR_UNILATERAL ' )
l1 . daemon . wait_for_log ( ' -> ONCHAIND_OUR_UNILATERAL ' )
@ -1668,12 +1668,12 @@ class LightningDTests(BaseLightningDTests):
# l1 will drop to chain, not reconnect.
# l1 will drop to chain, not reconnect.
l1 . daemon . wait_for_log ( ' dev_disconnect: -WIRE_REVOKE_AND_ACK ' )
l1 . daemon . wait_for_log ( ' dev_disconnect: -WIRE_REVOKE_AND_ACK ' )
# Deadline HTLC expit y minus 1/2 cltv-expiry delta (rounded up) (== cltv - 3). ctlv is 5+1.
# Deadline HTLC expir y minus 1/2 cltv-expiry delta (rounded up) (== cltv - 3). ctlv is 5+1.
bitcoind . rpc . generate ( 2 )
bitcoind . rpc . generate ( 2 )
assert not l2 . daemon . is_in_log ( ' hit deadline ' )
assert not l2 . daemon . is_in_log ( ' hit deadline ' )
bitcoind . rpc . generate ( 1 )
bitcoind . rpc . generate ( 2 )
l2 . daemon . wait_for_log ( ' Fulfilled HTLC 0 SENT_REMOVE_COMMIT cltv {} hit deadline ' . format ( bitcoind . rpc . getblockcount ( ) + 3 ) )
l2 . daemon . wait_for_log ( ' Fulfilled HTLC 0 SENT_REMOVE_COMMIT cltv .* hit deadline ' )
l2 . daemon . wait_for_log ( ' sendrawtx exit 0 ' )
l2 . daemon . wait_for_log ( ' sendrawtx exit 0 ' )
l2 . bitcoin . rpc . generate ( 1 )
l2 . bitcoin . rpc . generate ( 1 )
l2 . daemon . wait_for_log ( ' -> ONCHAIND_OUR_UNILATERAL ' )
l2 . daemon . wait_for_log ( ' -> ONCHAIND_OUR_UNILATERAL ' )