Skip to content

Commit

Permalink
remove unused fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Nov 19, 2024
1 parent 405c1be commit aed8a90
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions itest/lntest/cln_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions itest/lntest/lightning_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ type CreateInvoiceResult struct {

type PayResult struct {
PaymentHash []byte
AmountMsat uint64
Destination []byte
AmountSentMsat uint64
PaymentPreimage []byte
}
Expand Down
14 changes: 0 additions & 14 deletions itest/lntest/lnd_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aed8a90

Please sign in to comment.