From fc884a4ef03b17f3fbaed2d684481bd6c43c6d9a Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 20 May 2026 21:48:20 +0200 Subject: [PATCH] instantout: store active swaps under real hash New instant outs were added to the active map before the swap hash existed. The FSM was stored under the zero hash, making real-hash lookups fail. --- instantout/manager.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/instantout/manager.go b/instantout/manager.go index 37ccb681..be895e18 100644 --- a/instantout/manager.go +++ b/instantout/manager.go @@ -159,14 +159,12 @@ func (m *Manager) NewInstantOut(ctx context.Context, protocolVersion: CurrentProtocolVersion(), sweepAddress: sweepAddr, } + m.Unlock() instantOut, err := NewFSM(m.cfg, ProtocolVersionFullReservation) if err != nil { - m.Unlock() return nil, err } - m.activeInstantOuts[instantOut.InstantOut.SwapHash] = instantOut - m.Unlock() // Start the instantout FSM. go func() { @@ -186,6 +184,10 @@ func (m *Manager) NewInstantOut(ctx context.Context, return nil, err } + m.Lock() + m.activeInstantOuts[instantOut.InstantOut.SwapHash] = instantOut + m.Unlock() + return instantOut, nil }