File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ package labels
2+
3+ import "fmt"
4+
5+ const (
6+ // loopdLabelPattern is the pattern that loop uses to label on-chain
7+ // transactions in the lnd backend.
8+ loopdLabelPattern = "loopd -- %s(swap=%s)"
9+
10+ // loopOutSweepSuccess is the label used for loop out swaps to sweep
11+ // the HTLC in the success case.
12+ loopOutSweepSuccess = "OutSweepSuccess"
13+
14+ // loopInHtlc is the label used for loop in swaps to publish an HTLC.
15+ loopInHtlc = "InHtlc"
16+
17+ // loopInTimeout is the label used for loop in swaps to sweep an HTLC
18+ // that has timed out.
19+ loopInSweepTimeout = "InSweepTimeout"
20+ )
21+
22+ // LoopOutSweepSuccess returns the label used for loop out swaps to sweep the
23+ // HTLC in the success case.
24+ func LoopOutSweepSuccess (swapHash string ) string {
25+ return fmt .Sprintf (loopdLabelPattern , loopOutSweepSuccess , swapHash )
26+ }
27+
28+ // LoopInHtlcLabel returns the label used for loop in swaps to publish an HTLC.
29+ func LoopInHtlcLabel (swapHash string ) string {
30+ return fmt .Sprintf (loopdLabelPattern , loopInHtlc , swapHash )
31+ }
32+
33+ // LoopInSweepTimeout returns the label used for loop in swaps to sweep an HTLC
34+ // that has timed out.
35+ func LoopInSweepTimeout (swapHash string ) string {
36+ return fmt .Sprintf (loopdLabelPattern , loopInSweepTimeout , swapHash )
37+ }
You can’t perform that action at this time.
0 commit comments