Skip to content

Commit 87cc557

Browse files
committed
general: add ExternalHtlc to SwapInfo and add comments
1 parent b2b0bad commit 87cc557

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

interface.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,22 @@ type SwapInfoKit struct {
260260
type SwapInfo struct {
261261
loopdb.SwapStateData
262262

263+
loopdb.SwapContract
264+
265+
// LastUpdateTime is the time of the last state change.
263266
LastUpdate time.Time
264267

268+
// SwapHash stores the swap preimage hash.
265269
SwapHash lntypes.Hash
266270

271+
// SwapType describes whether this is a loop in or loop out swap.
267272
SwapType swap.Type
268273

269-
loopdb.SwapContract
270-
274+
// HtlcAddress holds the HTLC address of the swap.
271275
HtlcAddress btcutil.Address
276+
277+
// ExternalHtlc is set to true for external loop-in swaps.
278+
ExternalHtlc bool
272279
}
273280

274281
// LastUpdate returns the last update time of the swap

loopin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ func (s *loopInSwap) sendUpdate(ctx context.Context) error {
244244
s.log.Infof("Loop in swap state: %v", info.State)
245245

246246
info.HtlcAddress = s.htlc.Address
247+
info.ExternalHtlc = s.ExternalHtlc
247248

248249
select {
249250
case s.statusChan <- *info:

0 commit comments

Comments
 (0)