From 1be6d396770b4ce786d3e4a8303d6b557952551f Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Sun, 3 Mar 2024 11:49:31 +0100 Subject: [PATCH 1/2] instantout: log correct expiry --- instantout/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instantout/actions.go b/instantout/actions.go index d0c8f1b..ed551b8 100644 --- a/instantout/actions.go +++ b/instantout/actions.go @@ -107,7 +107,7 @@ func (f *FSM) InitInstantOutAction(eventCtx fsm.EventContext) fsm.EventType { if int32(res.Expiry) < initCtx.cltvExpiry+htlcExpiryDelta { return f.HandleError(fmt.Errorf("reservation %x has "+ "expiry %v which is less than the swap expiry %v", - resId, res.Expiry, initCtx.cltvExpiry)) + resId, res.Expiry, initCtx.cltvExpiry+htlcExpiryDelta)) } } From 194d02182496538fc26ac4f657b8f3ea4c8f7be5 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Sun, 3 Mar 2024 11:49:53 +0100 Subject: [PATCH 2/2] cmd: improve instantout ux --- cmd/loop/instantout.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/loop/instantout.go b/cmd/loop/instantout.go index 503a520..defc489 100644 --- a/cmd/loop/instantout.go +++ b/cmd/loop/instantout.go @@ -83,7 +83,10 @@ func instantOut(ctx *cli.Context) error { fmt.Printf("Available reservations: \n\n") for _, res := range confirmedReservations { idx++ - fmt.Printf("Reservation %v: %v \n", idx, res.Amount) + fmt.Printf("Reservation %v: shortid %x, amt %v, expiry "+ + "height %v \n", idx, res.ReservationId[:3], res.Amount, + res.Expiry) + totalAmt += int64(res.Amount) }