lnd_test: adds advanced switch persistence test, checking:

//   1. Carol --> Dave --> Alice --> Bob  forward payment
//   2. Carol --- Dave  X  Alice --- Bob  disconnect intermediaries
//   3. Carol --- Dave  X  Alice <-- Bob  settle last hop
//   4. Carol --- Dave  X         X       shutdown Bob, restart Alice
//   5. Carol <-- Dave <-- Alice  X       expect settle to propagate
This commit is contained in:
Conner Fromknecht 2018-03-04 00:20:26 -08:00
parent 38b04ec357
commit 6b74e28858
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF

@ -7498,13 +7498,13 @@ func testSwitchOfflineDeliveryPersistence(net *lntest.NetworkHarness, t *harness
// 1. Carol --> Dave --> Alice --> Bob forward payment // 1. Carol --> Dave --> Alice --> Bob forward payment
// 2. Carol --- Dave X Alice --- Bob disconnect intermediaries // 2. Carol --- Dave X Alice --- Bob disconnect intermediaries
// 3. Carol --- Dave X Alice <-- Bob settle last hop // 3. Carol --- Dave X Alice <-- Bob settle last hop
// 4. Carol --- Dave X X Bob restart Alice // 4. Carol --- Dave X X shutdown Bob, restart Alice
// 5. Carol <-- Dave <-- Alice --- Bob expect settle to propagate // 5. Carol <-- Dave <-- Alice X expect settle to propagate
func testSwitchOfflineDeliveryOutgoingOffline( func testSwitchOfflineDeliveryOutgoingOffline(
net *lntest.NetworkHarness, t *harnessTest) { net *lntest.NetworkHarness, t *harnessTest) {
const chanAmt = btcutil.Amount(100000) const chanAmt = btcutil.Amount(1000000)
const pushAmt = btcutil.Amount(90000) const pushAmt = btcutil.Amount(900000)
ctxb := context.Background() ctxb := context.Background()
timeout := time.Duration(time.Second * 15) timeout := time.Duration(time.Second * 15)