@@ -166,8 +166,13 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
166166 return nil , fmt .Errorf ("unable to decode response: %w" , err )
167167 }
168168
169- log .Debugf ("Received invoice: %s" , jsonBytes )
170- log .Debugf ("Received wire custom records: %v" ,
169+ iLog := log .WithPrefix (
170+ fmt .Sprintf ("Invoice(hash=%x, amt=%v): " ,
171+ req .Invoice .RHash , req .Invoice .Value ),
172+ )
173+
174+ iLog .Debugf ("received invoice: %s" , jsonBytes )
175+ iLog .Debugf ("received wire custom records: %v" ,
171176 limitSpewer .Sdump (req .WireCustomRecords ))
172177
173178 // Check if any strict forwarding rules need to be applied. Strict
@@ -209,7 +214,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
209214 return nil , fmt .Errorf ("unable to decode htlc: %w" , err )
210215 }
211216
212- log .Debugf ("Received htlc: %v" , limitSpewer .Sdump (htlc ))
217+ iLog .Debugf ("received htlc: %v" , limitSpewer .Sdump (htlc ))
213218
214219 // If we don't have an RFQ ID, then this is likely a keysend payment,
215220 // and we don't modify the amount (since the invoice amount will match
@@ -221,7 +226,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
221226 // We now run some validation checks on the asset HTLC.
222227 err = s .validateAssetHTLC (ctx , htlc , resp .CircuitKey )
223228 if err != nil {
224- log .Errorf ("Failed to validate asset HTLC: %v" , err )
229+ iLog .Errorf ("failed to validate asset HTLC: %v" , err )
225230
226231 resp .CancelSet = true
227232
@@ -266,7 +271,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
266271 totalInboundWithMargin := totalInbound + allowedMarginMSat + 1
267272 invoiceValue := lnwire .MilliSatoshi (req .Invoice .ValueMsat )
268273
269- log .Debugf ("Accepted HTLC sum: %v, current HTLC amount: %v, allowed " +
274+ iLog .Debugf ("accepted HTLC sum: %v, current HTLC amount: %v, allowed " +
270275 "margin: %v (total %v), invoice value %v" , acceptedHtlcSum ,
271276 resp .AmtPaid , allowedMarginMSat , totalInboundWithMargin ,
272277 invoiceValue )
0 commit comments