htlcswitch: add debug logs for fetching network result
This commit is contained in:
parent
7f9f4a7c8d
commit
4d645ef97f
@ -128,6 +128,8 @@ func (store *networkResultStore) storeResult(paymentID uint64,
|
|||||||
store.paymentIDMtx.Lock(paymentID)
|
store.paymentIDMtx.Lock(paymentID)
|
||||||
defer store.paymentIDMtx.Unlock(paymentID)
|
defer store.paymentIDMtx.Unlock(paymentID)
|
||||||
|
|
||||||
|
log.Debugf("Storing result for paymentID=%v", paymentID)
|
||||||
|
|
||||||
// Serialize the payment result.
|
// Serialize the payment result.
|
||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
if err := serializeNetworkResult(&b, result); err != nil {
|
if err := serializeNetworkResult(&b, result); err != nil {
|
||||||
@ -175,6 +177,8 @@ func (store *networkResultStore) subscribeResult(paymentID uint64) (
|
|||||||
store.paymentIDMtx.Lock(paymentID)
|
store.paymentIDMtx.Lock(paymentID)
|
||||||
defer store.paymentIDMtx.Unlock(paymentID)
|
defer store.paymentIDMtx.Unlock(paymentID)
|
||||||
|
|
||||||
|
log.Debugf("Subscribing to result for paymentID=%v", paymentID)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
result *networkResult
|
result *networkResult
|
||||||
resultChan = make(chan *networkResult, 1)
|
resultChan = make(chan *networkResult, 1)
|
||||||
|
@ -420,6 +420,9 @@ func (s *Switch) GetPaymentResult(paymentID uint64, paymentHash lntypes.Hash,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Debugf("Received network result %T for paymentID=%v", n.msg,
|
||||||
|
paymentID)
|
||||||
|
|
||||||
// Extract the result and pass it to the result channel.
|
// Extract the result and pass it to the result channel.
|
||||||
result, err := s.extractResult(
|
result, err := s.extractResult(
|
||||||
deobfuscator, n, paymentID, paymentHash,
|
deobfuscator, n, paymentID, paymentHash,
|
||||||
|
Loading…
Reference in New Issue
Block a user