lnwallet+chainregistry: remove unused FeeEstimator from wallet cfg
This commit is contained in:
parent
1fa13e5cfc
commit
16aad1a9ee
@ -178,7 +178,6 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
|
|||||||
RecoveryWindow: recoveryWindow,
|
RecoveryWindow: recoveryWindow,
|
||||||
DataDir: homeChainConfig.ChainDir,
|
DataDir: homeChainConfig.ChainDir,
|
||||||
NetParams: activeNetParams.Params,
|
NetParams: activeNetParams.Params,
|
||||||
FeeEstimator: cc.feeEstimator,
|
|
||||||
CoinType: activeNetParams.CoinType,
|
CoinType: activeNetParams.CoinType,
|
||||||
Wallet: wallet,
|
Wallet: wallet,
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import (
|
|||||||
"github.com/btcsuite/btcd/chaincfg"
|
"github.com/btcsuite/btcd/chaincfg"
|
||||||
"github.com/btcsuite/btcd/wire"
|
"github.com/btcsuite/btcd/wire"
|
||||||
"github.com/btcsuite/btcutil"
|
"github.com/btcsuite/btcutil"
|
||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
|
||||||
|
|
||||||
"github.com/btcsuite/btcwallet/chain"
|
"github.com/btcsuite/btcwallet/chain"
|
||||||
"github.com/btcsuite/btcwallet/wallet"
|
"github.com/btcsuite/btcwallet/wallet"
|
||||||
@ -79,11 +78,6 @@ type Config struct {
|
|||||||
// notifications for received funds, etc.
|
// notifications for received funds, etc.
|
||||||
ChainSource chain.Interface
|
ChainSource chain.Interface
|
||||||
|
|
||||||
// FeeEstimator is an instance of the fee estimator interface which
|
|
||||||
// will be used by the wallet to dynamically set transaction fees when
|
|
||||||
// crafting transactions.
|
|
||||||
FeeEstimator lnwallet.FeeEstimator
|
|
||||||
|
|
||||||
// NetParams is the net parameters for the target chain.
|
// NetParams is the net parameters for the target chain.
|
||||||
NetParams *chaincfg.Params
|
NetParams *chaincfg.Params
|
||||||
|
|
||||||
|
@ -2646,8 +2646,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
|
|
||||||
aliceWalletController lnwallet.WalletController
|
aliceWalletController lnwallet.WalletController
|
||||||
bobWalletController lnwallet.WalletController
|
bobWalletController lnwallet.WalletController
|
||||||
|
|
||||||
feeEstimator lnwallet.FeeEstimator
|
|
||||||
)
|
)
|
||||||
|
|
||||||
tempTestDirAlice, err := ioutil.TempDir("", "lnwallet")
|
tempTestDirAlice, err := ioutil.TempDir("", "lnwallet")
|
||||||
@ -2668,12 +2666,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
var aliceClient, bobClient chain.Interface
|
var aliceClient, bobClient chain.Interface
|
||||||
switch backEnd {
|
switch backEnd {
|
||||||
case "btcd":
|
case "btcd":
|
||||||
feeEstimator, err = lnwallet.NewBtcdFeeEstimator(
|
|
||||||
rpcConfig, 250)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("unable to create btcd fee estimator: %v",
|
|
||||||
err)
|
|
||||||
}
|
|
||||||
aliceClient, err = chain.NewRPCClient(netParams,
|
aliceClient, err = chain.NewRPCClient(netParams,
|
||||||
rpcConfig.Host, rpcConfig.User, rpcConfig.Pass,
|
rpcConfig.Host, rpcConfig.User, rpcConfig.Pass,
|
||||||
rpcConfig.Certificates, false, 20)
|
rpcConfig.Certificates, false, 20)
|
||||||
@ -2688,8 +2680,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "neutrino":
|
case "neutrino":
|
||||||
feeEstimator = lnwallet.NewStaticFeeEstimator(62500, 0)
|
|
||||||
|
|
||||||
// Set some package-level variable to speed up
|
// Set some package-level variable to speed up
|
||||||
// operation for tests.
|
// operation for tests.
|
||||||
neutrino.BanDuration = time.Millisecond * 100
|
neutrino.BanDuration = time.Millisecond * 100
|
||||||
@ -2751,12 +2741,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
)
|
)
|
||||||
|
|
||||||
case "bitcoind":
|
case "bitcoind":
|
||||||
feeEstimator, err = lnwallet.NewBitcoindFeeEstimator(
|
|
||||||
rpcConfig, 250)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("unable to create bitcoind fee estimator: %v",
|
|
||||||
err)
|
|
||||||
}
|
|
||||||
// Start a bitcoind instance.
|
// Start a bitcoind instance.
|
||||||
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
|
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -2824,7 +2808,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
DataDir: tempTestDirAlice,
|
DataDir: tempTestDirAlice,
|
||||||
NetParams: netParams,
|
NetParams: netParams,
|
||||||
ChainSource: aliceClient,
|
ChainSource: aliceClient,
|
||||||
FeeEstimator: feeEstimator,
|
|
||||||
CoinType: keychain.CoinTypeTestnet,
|
CoinType: keychain.CoinTypeTestnet,
|
||||||
}
|
}
|
||||||
aliceWalletController, err = walletDriver.New(aliceWalletConfig)
|
aliceWalletController, err = walletDriver.New(aliceWalletConfig)
|
||||||
@ -2848,7 +2831,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
|
|||||||
DataDir: tempTestDirBob,
|
DataDir: tempTestDirBob,
|
||||||
NetParams: netParams,
|
NetParams: netParams,
|
||||||
ChainSource: bobClient,
|
ChainSource: bobClient,
|
||||||
FeeEstimator: feeEstimator,
|
|
||||||
CoinType: keychain.CoinTypeTestnet,
|
CoinType: keychain.CoinTypeTestnet,
|
||||||
}
|
}
|
||||||
bobWalletController, err = walletDriver.New(bobWalletConfig)
|
bobWalletController, err = walletDriver.New(bobWalletConfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user