htlcswitch: improve loggings for Keystone
This commit is contained in:
3 files changed
+4
-2
No files matched your search
@@ -935,7 +935,7 @@ type Keystone struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// String returns a human readable description of the Keystone.
|
// String returns a human readable description of the Keystone.
|
||||||
func (k *Keystone) String() string {
|
func (k Keystone) String() string {
|
||||||
return fmt.Sprintf("%s --> %s", k.InKey, k.OutKey)
|
return fmt.Sprintf("%s --> %s", k.InKey, k.OutKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -548,6 +548,8 @@ func (m *memoryMailBox) mailCourier(cType courierType) {
|
|||||||
m.pktCond.L.Unlock()
|
m.pktCond.L.Unlock()
|
||||||
|
|
||||||
case <-deadline:
|
case <-deadline:
|
||||||
|
log.Debugf("Expiring add htlc with "+
|
||||||
|
"keystone=%v", add.keystone())
|
||||||
m.FailAdd(add)
|
m.FailAdd(add)
|
||||||
|
|
||||||
case pktDone := <-m.pktReset:
|
case pktDone := <-m.pktReset:
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ func (c *mailboxContext) checkFails(adds []*htlcPacket) {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
case pkt := <-c.forwards:
|
case pkt := <-c.forwards:
|
||||||
c.t.Fatalf("unexpected forward: %v", pkt)
|
c.t.Fatalf("unexpected forward: %v", pkt.keystone())
|
||||||
case <-time.After(50 * time.Millisecond):
|
case <-time.After(50 * time.Millisecond):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user