mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-09 21:23:03 +02:00
sweep: add list sweeps function
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
@@ -1262,6 +1263,11 @@ func DefaultNextAttemptDeltaFunc(attempts int) int32 {
|
||||
return 1 + rand.Int31n(1<<uint(attempts-1))
|
||||
}
|
||||
|
||||
// ListSweeps returns a list of the the sweeps recorded by the sweep store.
|
||||
func (s *UtxoSweeper) ListSweeps() ([]chainhash.Hash, error) {
|
||||
return s.cfg.Store.ListSweeps()
|
||||
}
|
||||
|
||||
// init initializes the random generator for random input rescheduling.
|
||||
func init() {
|
||||
rand.Seed(time.Now().Unix())
|
||||
|
Reference in New Issue
Block a user