@@ -166,8 +166,13 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
166
166
return nil , fmt .Errorf ("unable to decode response: %w" , err )
167
167
}
168
168
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" ,
171
176
limitSpewer .Sdump (req .WireCustomRecords ))
172
177
173
178
// Check if any strict forwarding rules need to be applied. Strict
@@ -209,7 +214,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
209
214
return nil , fmt .Errorf ("unable to decode htlc: %w" , err )
210
215
}
211
216
212
- log .Debugf ("Received htlc: %v" , limitSpewer .Sdump (htlc ))
217
+ iLog .Debugf ("received htlc: %v" , limitSpewer .Sdump (htlc ))
213
218
214
219
// If we don't have an RFQ ID, then this is likely a keysend payment,
215
220
// and we don't modify the amount (since the invoice amount will match
@@ -221,7 +226,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
221
226
// We now run some validation checks on the asset HTLC.
222
227
err = s .validateAssetHTLC (ctx , htlc , resp .CircuitKey )
223
228
if err != nil {
224
- log .Errorf ("Failed to validate asset HTLC: %v" , err )
229
+ iLog .Errorf ("failed to validate asset HTLC: %v" , err )
225
230
226
231
resp .CancelSet = true
227
232
@@ -266,7 +271,7 @@ func (s *AuxInvoiceManager) handleInvoiceAccept(ctx context.Context,
266
271
totalInboundWithMargin := totalInbound + allowedMarginMSat + 1
267
272
invoiceValue := lnwire .MilliSatoshi (req .Invoice .ValueMsat )
268
273
269
- log .Debugf ("Accepted HTLC sum: %v, current HTLC amount: %v, allowed " +
274
+ iLog .Debugf ("accepted HTLC sum: %v, current HTLC amount: %v, allowed " +
270
275
"margin: %v (total %v), invoice value %v" , acceptedHtlcSum ,
271
276
resp .AmtPaid , allowedMarginMSat , totalInboundWithMargin ,
272
277
invoiceValue )
0 commit comments