mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 23:53:41 +02:00
multi: deprecate batchwindowduration
config option
This commit is contained in:
@@ -1,17 +1,10 @@
|
||||
package sweep
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
// DefaultMaxFeeRate is the default maximum fee rate allowed within the
|
||||
// UtxoSweeper. The current value is equivalent to a fee rate of 1,000
|
||||
// sat/vbyte.
|
||||
|
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
@@ -318,12 +317,6 @@ type UtxoSweeperConfig struct {
|
||||
// Wallet contains the wallet functions that sweeper requires.
|
||||
Wallet Wallet
|
||||
|
||||
// TickerDuration is used to create a channel that will be sent on when
|
||||
// a certain time window has passed. During this time window, new
|
||||
// inputs can still be added to the sweep tx that is about to be
|
||||
// generated.
|
||||
TickerDuration time.Duration
|
||||
|
||||
// Notifier is an instance of a chain notifier we'll use to watch for
|
||||
// certain on-chain events.
|
||||
Notifier chainntnfs.ChainNotifier
|
||||
|
@@ -138,11 +138,10 @@ func createSweeperTestContext(t *testing.T) *sweeperTestContext {
|
||||
}
|
||||
|
||||
ctx.sweeper = New(&UtxoSweeperConfig{
|
||||
Notifier: notifier,
|
||||
Wallet: backend,
|
||||
TickerDuration: 100 * time.Millisecond,
|
||||
Store: store,
|
||||
Signer: &lnmock.DummySigner{},
|
||||
Notifier: notifier,
|
||||
Wallet: backend,
|
||||
Store: store,
|
||||
Signer: &lnmock.DummySigner{},
|
||||
GenSweepScript: func() ([]byte, error) {
|
||||
script := make([]byte, input.P2WPKHSize)
|
||||
script[0] = 0
|
||||
|
Reference in New Issue
Block a user