multi: unexport session key and add constructor for htlc attempt info

This commit is contained in:
carla
2021-05-19 09:03:46 +02:00
parent 6c330d3121
commit eb068bf666
7 changed files with 35 additions and 24 deletions

View File

@@ -70,7 +70,7 @@ func makeFakeInfo() (*PaymentCreationInfo, *HTLCAttemptInfo) {
a := &HTLCAttemptInfo{
AttemptID: 44,
SessionKey: priv,
sessionKey: priv,
Route: testRoute,
AttemptTime: time.Unix(100, 0),
Hash: &hash,
@@ -124,8 +124,6 @@ func TestSentPaymentSerialization(t *testing.T) {
s.Route = route.Route{}
if !reflect.DeepEqual(s, newWireInfo) {
s.SessionKey.Curve = nil
newWireInfo.SessionKey.Curve = nil
t.Fatalf("Payments do not match after "+
"serialization/deserialization %v vs %v",
spew.Sdump(s), spew.Sdump(newWireInfo),