multi: formatting and comment fixes

This commit is contained in:
Oliver Gugger
2022-02-07 13:58:28 +01:00
parent ffee7d1bcf
commit 895a2e497b
160 changed files with 159 additions and 260 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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: