Pass chain and client variables where needed
This commit does not change behavior. All it does is pass new function
parameters.
It is easiest to review this change with:
git log -p -n1 -U0 --word-diff-regex=.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <bench/bench.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <wallet/wallet.h>
|
||||
#include <wallet/coinselection.h>
|
||||
|
||||
@@ -33,7 +34,8 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<Ou
|
||||
// (https://github.com/bitcoin/bitcoin/issues/7883#issuecomment-224807484)
|
||||
static void CoinSelection(benchmark::State& state)
|
||||
{
|
||||
const CWallet wallet(WalletLocation(), WalletDatabase::CreateDummy());
|
||||
auto chain = interfaces::MakeChain();
|
||||
const CWallet wallet(*chain, WalletLocation(), WalletDatabase::CreateDummy());
|
||||
LOCK(wallet.cs_wallet);
|
||||
|
||||
// Add coins.
|
||||
@@ -57,7 +59,8 @@ static void CoinSelection(benchmark::State& state)
|
||||
}
|
||||
|
||||
typedef std::set<CInputCoin> CoinSet;
|
||||
static const CWallet testWallet(WalletLocation(), WalletDatabase::CreateDummy());
|
||||
static auto testChain = interfaces::MakeChain();
|
||||
static const CWallet testWallet(*testChain, WalletLocation(), WalletDatabase::CreateDummy());
|
||||
std::vector<std::unique_ptr<CWalletTx>> wtxn;
|
||||
|
||||
// Copied from src/wallet/test/coinselector_tests.cpp
|
||||
|
||||
Reference in New Issue
Block a user