multi: formatting and comment fixes

This commit is contained in:
Oliver Gugger committed 2022-02-10 11:02:02 +01:00
1 parent ffee7d1bcf
commit 895a2e497b
160 files changed
+159 -260

No files matched your search

+1 -4
View File
@@ -157,7 +157,6 @@ func (d *AddInvoiceData) paymentHashAndPreimage() (
// The preimage will always be nil.
func (d *AddInvoiceData) ampPaymentHashAndPreimage() (*lntypes.Preimage, lntypes.Hash, error) {
switch {
// Preimages cannot be set on AMP invoice.
case d.Preimage != nil:
return nil, lntypes.Hash{},
@@ -285,7 +284,6 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
}
switch {
// If expiry is set, specify it. If it is not provided, no expiry time
// will be explicitly added to this payment request, which will imply
// the default 3600 seconds.
@@ -313,7 +311,6 @@ func AddInvoice(ctx context.Context, cfg *AddInvoiceConfig,
// Otherwise, use the default AMP expiry.
default:
options = append(options, zpay32.Expiry(DefaultAMPInvoiceExpiry))
}
// If the description hash is set, then we add it do the list of options.
@@ -661,7 +658,7 @@ func sufficientHints(numHints, maxHints, scalingFactor int, amount,
// channels. The set of hop hints will be returned as a slice of functional
// options that'll append the route hint to the set of all route hints.
//
// TODO(roasbeef): do proper sub-set sum max hints usually << numChans
// TODO(roasbeef): do proper sub-set sum max hints usually << numChans.
func SelectHopHints(amtMSat lnwire.MilliSatoshi, cfg *SelectHopHintsCfg,
openChannels []*HopHintInfo,
numMaxHophints int) [][]zpay32.HopHint {
-1
View File
@@ -461,7 +461,6 @@ func TestSelectHopHints(t *testing.T) {
setMockChannelUsed(
h, private1ShortID, privateChan1Policy,
)
},
// Add two channels that we'd want to use, but the
// second one will be cut off due to our hop hint count
-2
View File
@@ -38,7 +38,6 @@ func decodePayReq(invoice *channeldb.Invoice,
"request: %v", err)
}
return decoded, nil
}
// CreateRPCInvoice creates an *lnrpc.Invoice from the *channeldb.Invoice.
@@ -179,7 +178,6 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
rpcInvoice.AmpInvoiceState = make(map[string]*lnrpc.AMPInvoiceState)
for setID, ampState := range invoice.AMPState {
setIDStr := hex.EncodeToString(setID[:])
var state lnrpc.InvoiceHTLCState