itest: update multi hop test case docs
To make clear whcih sweep scenarios are actually being tested
This commit is contained in:
7 files changed
+18
-16
No files matched your search
@@ -18,9 +18,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// testMultiHopHtlcLocalChainClaim tests that in a multi-hop HTLC scenario, if
|
// testMultiHopHtlcLocalChainClaim tests that in a multi-hop HTLC scenario, if
|
||||||
// we're forced to go to chain with an incoming HTLC, then when we find out the
|
// we force close a channel with an incoming HTLC, and later find out the
|
||||||
// preimage via the witness beacon, we properly settle the HTLC on-chain in
|
// preimage via the witness beacon, we properly settle the HTLC on-chain using
|
||||||
// order to ensure we don't lose any funds.
|
// the HTLC success transaction in order to ensure we don't lose any funds.
|
||||||
func testMultiHopHtlcLocalChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
func testMultiHopHtlcLocalChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import (
|
|||||||
|
|
||||||
// testMultiHopHtlcLocalTimeout tests that in a multi-hop HTLC scenario, if the
|
// testMultiHopHtlcLocalTimeout tests that in a multi-hop HTLC scenario, if the
|
||||||
// outgoing HTLC is about to time out, then we'll go to chain in order to claim
|
// outgoing HTLC is about to time out, then we'll go to chain in order to claim
|
||||||
// it. Any dust HTLC's should be immediately canceled backwards. Once the
|
// it using the HTLC timeout transaction. Any dust HTLC's should be immediately
|
||||||
// timeout has been reached, then we should sweep it on-chain, and cancel the
|
// canceled backwards. Once the timeout has been reached, then we should sweep
|
||||||
// HTLC backwards.
|
// it on-chain, and cancel the HTLC backwards.
|
||||||
func testMultiHopHtlcLocalTimeout(net *lntest.NetworkHarness, t *harnessTest) {
|
func testMultiHopHtlcLocalTimeout(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,10 @@ import (
|
|||||||
|
|
||||||
// testMultiHopReceiverChainClaim tests that in the multi-hop setting, if the
|
// testMultiHopReceiverChainClaim tests that in the multi-hop setting, if the
|
||||||
// receiver of an HTLC knows the preimage, but wasn't able to settle the HTLC
|
// receiver of an HTLC knows the preimage, but wasn't able to settle the HTLC
|
||||||
// off-chain, then it goes on chain to claim the HTLC. In this scenario, the
|
// off-chain, then it goes on chain to claim the HTLC uing the HTLC success
|
||||||
// node that sent the outgoing HTLC should extract the preimage from the sweep
|
// transaction. In this scenario, the node that sent the outgoing HTLC should
|
||||||
// transaction, and finish settling the HTLC backwards into the route.
|
// extract the preimage from the sweep transaction, and finish settling the
|
||||||
|
// HTLC backwards into the route.
|
||||||
func testMultiHopReceiverChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
func testMultiHopReceiverChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import (
|
|||||||
// testMultiHopHtlcRemoteChainClaim tests that in the multi-hop HTLC scenario,
|
// testMultiHopHtlcRemoteChainClaim tests that in the multi-hop HTLC scenario,
|
||||||
// if the remote party goes to chain while we have an incoming HTLC, then when
|
// if the remote party goes to chain while we have an incoming HTLC, then when
|
||||||
// we found out the preimage via the witness beacon, we properly settle the
|
// we found out the preimage via the witness beacon, we properly settle the
|
||||||
// HTLC on-chain in order to ensure that we don't lose any funds.
|
// HTLC directly on-chain using the preimage in order to ensure that we don't
|
||||||
|
// lose any funds.
|
||||||
func testMultiHopHtlcRemoteChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
func testMultiHopHtlcRemoteChainClaim(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import (
|
|||||||
// testMultiHopLocalForceCloseOnChainHtlcTimeout tests that in a multi-hop HTLC
|
// testMultiHopLocalForceCloseOnChainHtlcTimeout tests that in a multi-hop HTLC
|
||||||
// scenario, if the node that extended the HTLC to the final node closes their
|
// scenario, if the node that extended the HTLC to the final node closes their
|
||||||
// commitment on-chain early, then it eventually recognizes this HTLC as one
|
// commitment on-chain early, then it eventually recognizes this HTLC as one
|
||||||
// that's timed out. At this point, the node should timeout the HTLC, then
|
// that's timed out. At this point, the node should timeout the HTLC using the
|
||||||
// cancel it backwards as normal.
|
// HTLC timeout transaction, then cancel it backwards as normal.
|
||||||
func testMultiHopLocalForceCloseOnChainHtlcTimeout(net *lntest.NetworkHarness,
|
func testMultiHopLocalForceCloseOnChainHtlcTimeout(net *lntest.NetworkHarness,
|
||||||
t *harnessTest) {
|
t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ import (
|
|||||||
|
|
||||||
// testMultiHopRemoteForceCloseOnChainHtlcTimeout tests that if we extend a
|
// testMultiHopRemoteForceCloseOnChainHtlcTimeout tests that if we extend a
|
||||||
// multi-hop HTLC, and the final destination of the HTLC force closes the
|
// multi-hop HTLC, and the final destination of the HTLC force closes the
|
||||||
// channel, then we properly timeout the HTLC on *their* commitment transaction
|
// channel, then we properly timeout the HTLC directly on *their* commitment
|
||||||
// once the timeout has expired. Once we sweep the transaction, we should also
|
// transaction once the timeout has expired. Once we sweep the transaction, we
|
||||||
// cancel back the initial HTLC.
|
// should also cancel back the initial HTLC.
|
||||||
func testMultiHopRemoteForceCloseOnChainHtlcTimeout(net *lntest.NetworkHarness,
|
func testMultiHopRemoteForceCloseOnChainHtlcTimeout(net *lntest.NetworkHarness,
|
||||||
t *harnessTest) {
|
t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|||||||
@@ -2976,7 +2976,7 @@ func padCLTV(cltv uint32) uint32 {
|
|||||||
// total of 3 + n transactions will be broadcast, representing the commitment
|
// total of 3 + n transactions will be broadcast, representing the commitment
|
||||||
// transaction, a transaction sweeping the local CSV delayed output, a
|
// transaction, a transaction sweeping the local CSV delayed output, a
|
||||||
// transaction sweeping the CSV delayed 2nd-layer htlcs outputs, and n
|
// transaction sweeping the CSV delayed 2nd-layer htlcs outputs, and n
|
||||||
// htlc success transactions, where n is the number of payments Alice attempted
|
// htlc timeout transactions, where n is the number of payments Alice attempted
|
||||||
// to send to Carol. This test includes several restarts to ensure that the
|
// to send to Carol. This test includes several restarts to ensure that the
|
||||||
// transaction output states are persisted throughout the forced closure
|
// transaction output states are persisted throughout the forced closure
|
||||||
// process.
|
// process.
|
||||||
|
|||||||
Reference in new issue
Block a user