From aed8a90787a40be4c4179079ede5b23721c8a95e Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Tue, 19 Nov 2024 20:44:03 +0100 Subject: [PATCH] remove unused fields --- itest/lntest/cln_node.go | 4 ---- itest/lntest/lightning_node.go | 2 -- itest/lntest/lnd_node.go | 14 -------------- 3 files changed, 20 deletions(-) diff --git a/itest/lntest/cln_node.go b/itest/lntest/cln_node.go index bedbc373..a45289d8 100644 --- a/itest/lntest/cln_node.go +++ b/itest/lntest/cln_node.go @@ -563,8 +563,6 @@ func (n *ClnNode) Pay(bolt11 string) *PayResult { return &PayResult{ PaymentHash: resp.PaymentHash, - AmountMsat: resp.AmountMsat.Msat, - Destination: resp.Destination, AmountSentMsat: resp.AmountSentMsat.Msat, PaymentPreimage: resp.PaymentPreimage, } @@ -680,8 +678,6 @@ func (n *ClnNode) PayViaRoute( return &PayResult{ PaymentHash: w.PaymentHash, - AmountMsat: w.AmountMsat.Msat, - Destination: w.Destination, AmountSentMsat: w.AmountSentMsat.Msat, PaymentPreimage: w.PaymentPreimage, }, nil diff --git a/itest/lntest/lightning_node.go b/itest/lntest/lightning_node.go index f99b8f11..f21728ac 100644 --- a/itest/lntest/lightning_node.go +++ b/itest/lntest/lightning_node.go @@ -61,8 +61,6 @@ type CreateInvoiceResult struct { type PayResult struct { PaymentHash []byte - AmountMsat uint64 - Destination []byte AmountSentMsat uint64 PaymentPreimage []byte } diff --git a/itest/lntest/lnd_node.go b/itest/lntest/lnd_node.go index 1ca77f81..fccdaa3b 100644 --- a/itest/lntest/lnd_node.go +++ b/itest/lntest/lnd_node.go @@ -550,14 +550,8 @@ func (n *LndNode) Pay(bolt11 string) *PayResult { }) CheckError(n.harness.T, err) - lastHop := resp.PaymentRoute.Hops[len(resp.PaymentRoute.Hops)-1] - dest, err := hex.DecodeString(lastHop.PubKey) - CheckError(n.harness.T, err) - return &PayResult{ PaymentHash: resp.PaymentHash, - AmountMsat: uint64(lastHop.AmtToForwardMsat), - Destination: dest, AmountSentMsat: uint64(resp.PaymentRoute.TotalAmtMsat), PaymentPreimage: resp.PaymentPreimage, } @@ -617,16 +611,8 @@ func (n *LndNode) PayViaRoute(amountMsat uint64, paymentHash []byte, paymentSecr return nil, err } - lastHop := resp.PaymentRoute.Hops[len(resp.PaymentRoute.Hops)-1] - dest, err := hex.DecodeString(lastHop.PubKey) - if err != nil { - return nil, err - } - return &PayResult{ PaymentHash: resp.PaymentHash, - AmountMsat: uint64(resp.PaymentRoute.TotalAmtMsat) - uint64(resp.PaymentRoute.TotalFeesMsat), - Destination: dest, AmountSentMsat: uint64(resp.PaymentRoute.TotalAmtMsat), PaymentPreimage: resp.PaymentPreimage, }, nil