diff --git a/htlcswitch/circuit_map.go b/htlcswitch/circuit_map.go index a62067727..9b26a1d07 100644 --- a/htlcswitch/circuit_map.go +++ b/htlcswitch/circuit_map.go @@ -935,7 +935,7 @@ type Keystone struct { } // 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) } diff --git a/htlcswitch/mailbox.go b/htlcswitch/mailbox.go index de85f7818..cc3bd1c83 100644 --- a/htlcswitch/mailbox.go +++ b/htlcswitch/mailbox.go @@ -548,6 +548,8 @@ func (m *memoryMailBox) mailCourier(cType courierType) { m.pktCond.L.Unlock() case <-deadline: + log.Debugf("Expiring add htlc with "+ + "keystone=%v", add.keystone()) m.FailAdd(add) case pktDone := <-m.pktReset: diff --git a/htlcswitch/mailbox_test.go b/htlcswitch/mailbox_test.go index b4fc8a6ec..9acb84d5f 100644 --- a/htlcswitch/mailbox_test.go +++ b/htlcswitch/mailbox_test.go @@ -294,7 +294,7 @@ func (c *mailboxContext) checkFails(adds []*htlcPacket) { select { 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): } }