channeldb: read raw htlc attempt session key

This commit is contained in:
carla
2021-05-19 09:03:52 +02:00
parent eb068bf666
commit 8071ebb16a
5 changed files with 52 additions and 23 deletions

View File

@ -37,17 +37,15 @@ func genInfo() (*PaymentCreationInfo, *HTLCAttemptInfo,
}
rhash := sha256.Sum256(preimage[:])
attempt := NewHtlcAttemptInfo(
0, priv, *testRoute.Copy(), time.Time{}, nil,
)
return &PaymentCreationInfo{
PaymentIdentifier: rhash,
Value: testRoute.ReceiverAmt(),
CreationTime: time.Unix(time.Now().Unix(), 0),
PaymentRequest: []byte("hola"),
},
&HTLCAttemptInfo{
AttemptID: 0,
sessionKey: priv,
Route: *testRoute.Copy(),
}, preimage, nil
PaymentIdentifier: rhash,
Value: testRoute.ReceiverAmt(),
CreationTime: time.Unix(time.Now().Unix(), 0),
PaymentRequest: []byte("hola"),
}, attempt, preimage, nil
}
// TestPaymentControlSwitchFail checks that payment status returns to Failed