-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sweepbatcher: use lnd/clock for timers
Added option: WithClock. Use it for waitingPeriod and publishDelay timers. The test now runs in 0.5s instead of 10s. Testing for urgent batch failed sometimes, because the check happen to run before addSweep and the batch was empty at that point (timeout unknown). To fix this, the check was moved to timerChan handler, just before the code that checks if waiting period has ended, before publishing. By that time the sweep is added.
- Loading branch information
Showing
3 changed files
with
307 additions
and
80 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
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
Oops, something went wrong.