lnwallet+chainregistry: remove unused FeeEstimator from wallet cfg

This commit is contained in:
Unknown 2019-04-12 14:13:48 -07:00 committed by Valentine Wallace
parent 1fa13e5cfc
commit 16aad1a9ee
3 changed files with 12 additions and 37 deletions

@ -178,7 +178,6 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
RecoveryWindow: recoveryWindow,
DataDir: homeChainConfig.ChainDir,
NetParams: activeNetParams.Params,
FeeEstimator: cc.feeEstimator,
CoinType: activeNetParams.CoinType,
Wallet: wallet,
}

@ -7,7 +7,6 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/btcsuite/btcwallet/chain"
"github.com/btcsuite/btcwallet/wallet"
@ -79,11 +78,6 @@ type Config struct {
// notifications for received funds, etc.
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 *chaincfg.Params

@ -2646,8 +2646,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
aliceWalletController lnwallet.WalletController
bobWalletController lnwallet.WalletController
feeEstimator lnwallet.FeeEstimator
)
tempTestDirAlice, err := ioutil.TempDir("", "lnwallet")
@ -2668,12 +2666,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
var aliceClient, bobClient chain.Interface
switch backEnd {
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,
rpcConfig.Host, rpcConfig.User, rpcConfig.Pass,
rpcConfig.Certificates, false, 20)
@ -2688,8 +2680,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
}
case "neutrino":
feeEstimator = lnwallet.NewStaticFeeEstimator(62500, 0)
// Set some package-level variable to speed up
// operation for tests.
neutrino.BanDuration = time.Millisecond * 100
@ -2751,12 +2741,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
)
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.
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
if err != nil {
@ -2824,7 +2808,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
DataDir: tempTestDirAlice,
NetParams: netParams,
ChainSource: aliceClient,
FeeEstimator: feeEstimator,
CoinType: keychain.CoinTypeTestnet,
}
aliceWalletController, err = walletDriver.New(aliceWalletConfig)
@ -2848,7 +2831,6 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver,
DataDir: tempTestDirBob,
NetParams: netParams,
ChainSource: bobClient,
FeeEstimator: feeEstimator,
CoinType: keychain.CoinTypeTestnet,
}
bobWalletController, err = walletDriver.New(bobWalletConfig)