sweepbatcher: add sweep batch

This commit is contained in:
George Tsagkarelis 2023-08-23 17:44:01 +03:00
parent 26e239c2c7
commit 56784ab921
No known key found for this signature in database
GPG key ID: E08DEA9B12B66AF6
4 changed files with 1421 additions and 0 deletions

View file

@ -17,6 +17,8 @@ const (
// loopInTimeout is the label used for loop in swaps to sweep an HTLC
// that has timed out.
loopInSweepTimeout = "InSweepTimeout"
loopOutBatchSweepSuccess = "BatchOutSweepSuccess -- %d"
)
// LoopOutSweepSuccess returns the label used for loop out swaps to sweep the
@ -25,6 +27,11 @@ func LoopOutSweepSuccess(swapHash string) string {
return fmt.Sprintf(loopdLabelPattern, loopOutSweepSuccess, swapHash)
}
// LoopOutBatchSweepSuccess returns the label used for loop out sweep batcher.
func LoopOutBatchSweepSuccess(batchID int32) string {
return fmt.Sprintf(loopOutBatchSweepSuccess, batchID)
}
// LoopInHtlcLabel returns the label used for loop in swaps to publish an HTLC.
func LoopInHtlcLabel(swapHash string) string {
return fmt.Sprintf(loopdLabelPattern, loopInHtlc, swapHash)