forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In this commit, the sweep package is extended from just tx generation to an active sweeper that collects sweep inputs and autonomously proceeds to publish the sweep tx after the batch window time interval has passed without new inputs being added.
- Loading branch information
1 parent
1f06565
commit 01e64af
Showing
3 changed files
with
754 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// +build !rpctest | ||
|
||
package sweep | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
var ( | ||
// DefaultBatchWindowDuration specifies duration of the sweep batch | ||
// window. The sweep is held back during the batch window to allow more | ||
// inputs to be added and thereby lower the fee per input. | ||
DefaultBatchWindowDuration = 30 * time.Second | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// +build rpctest | ||
|
||
package sweep | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
var ( | ||
// DefaultBatchWindowDuration specifies duration of the sweep batch | ||
// window. The sweep is held back during the batch window to allow more | ||
// inputs to be added and thereby lower the fee per input. | ||
// | ||
// To speed up integration tests waiting for a sweep to happen, the | ||
// batch window is shortened. | ||
DefaultBatchWindowDuration = 2 * time.Second | ||
) |
Oops, something went wrong.