mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
multi: formatting and comment fixes
This commit is contained in:
@@ -404,7 +404,6 @@ func (ew *InvoiceExpiryWatcher) mainLoop(blockNtfns *chainntnfs.BlockEpochEvent)
|
||||
cancelNext()
|
||||
|
||||
select {
|
||||
|
||||
case newInvoices := <-ew.newInvoices:
|
||||
// Take newly forwarded invoices with higher priority
|
||||
// in order to not block the newInvoices channel.
|
||||
@@ -413,7 +412,6 @@ func (ew *InvoiceExpiryWatcher) mainLoop(blockNtfns *chainntnfs.BlockEpochEvent)
|
||||
|
||||
default:
|
||||
select {
|
||||
|
||||
// Wait until the next invoice expires.
|
||||
case <-ew.nextTimestampExpiry():
|
||||
cancelNext = ew.cancelNextExpiredInvoice
|
||||
|
@@ -176,8 +176,8 @@ func (i *InvoiceRegistry) scanInvoicesOnStart() error {
|
||||
removable = make([]channeldb.InvoiceDeleteRef, 0)
|
||||
}
|
||||
|
||||
scanFunc := func(
|
||||
paymentHash lntypes.Hash, invoice *channeldb.Invoice) error {
|
||||
scanFunc := func(paymentHash lntypes.Hash,
|
||||
invoice *channeldb.Invoice) error {
|
||||
|
||||
if invoice.IsPending() {
|
||||
expiryRef := makeInvoiceExpiry(paymentHash, invoice)
|
||||
@@ -428,7 +428,6 @@ func (i *InvoiceRegistry) dispatchToClients(event *invoiceEvent) {
|
||||
// event is added while we're catching up a new client.
|
||||
invState := event.invoice.State
|
||||
switch {
|
||||
|
||||
case invState == channeldb.ContractSettled:
|
||||
client.settleIndex = invoice.SettleIndex
|
||||
|
||||
@@ -908,7 +907,6 @@ func (i *InvoiceRegistry) NotifyExitHopHtlc(rHash lntypes.Hash,
|
||||
}
|
||||
|
||||
switch {
|
||||
|
||||
// If we are accepting spontaneous AMP payments and this payload
|
||||
// contains an AMP record, create an AMP invoice that will be settled
|
||||
// below.
|
||||
|
@@ -128,7 +128,6 @@ func updateMpp(ctx *invoiceUpdateCtx,
|
||||
// Reject HTLCs to AMP invoices if they are missing an AMP payload, and
|
||||
// HTLCs to MPP invoices if they have an AMP payload.
|
||||
switch {
|
||||
|
||||
case inv.Terms.Features.RequiresFeature(lnwire.AMPRequired) &&
|
||||
ctx.amp == nil:
|
||||
|
||||
|
Reference in New Issue
Block a user