multi: add more logging when fetching invoices and payments.

This commit is contained in:
ziggie committed 2025-04-18 16:33:39 +02:00
1 parent 729c84bee3
commit 440ed31419
7 files changed
+134 -6

No files matched your search

+9
View File
@@ -484,16 +484,25 @@ func (i *InvoiceRegistry) dispatchToClients(event *invoiceEvent) {
func (i *InvoiceRegistry) deliverBacklogEvents(ctx context.Context,
client *InvoiceSubscription) error {
log.Debugf("Collecting added invoices since %v for client %v",
client.addIndex, client.id)
addEvents, err := i.idb.InvoicesAddedSince(ctx, client.addIndex)
if err != nil {
return err
}
log.Debugf("Collecting settled invoices since %v for client %v",
client.settleIndex, client.id)
settleEvents, err := i.idb.InvoicesSettledSince(ctx, client.settleIndex)
if err != nil {
return err
}
log.Debugf("Delivering %d added invoices and %d settled invoices "+
"for client %v", len(addEvents), len(settleEvents), client.id)
// If we have any to deliver, then we'll append them to the end of the
// notification queue in order to catch up the client before delivering
// any new notifications.