general: add ExternalHtlc to SwapInfo and add comments

pull/184/head
Andras Banki-Horvath 4 years ago
parent b2b0bad951
commit 87cc5571ef

@ -260,15 +260,22 @@ type SwapInfoKit struct {
type SwapInfo struct {
loopdb.SwapStateData
loopdb.SwapContract
// LastUpdateTime is the time of the last state change.
LastUpdate time.Time
// SwapHash stores the swap preimage hash.
SwapHash lntypes.Hash
// SwapType describes whether this is a loop in or loop out swap.
SwapType swap.Type
loopdb.SwapContract
// HtlcAddress holds the HTLC address of the swap.
HtlcAddress btcutil.Address
// ExternalHtlc is set to true for external loop-in swaps.
ExternalHtlc bool
}
// LastUpdate returns the last update time of the swap

@ -244,6 +244,7 @@ func (s *loopInSwap) sendUpdate(ctx context.Context) error {
s.log.Infof("Loop in swap state: %v", info.State)
info.HtlcAddress = s.htlc.Address
info.ExternalHtlc = s.ExternalHtlc
select {
case s.statusChan <- *info:

Loading…
Cancel
Save