Bitcoin Core  0.19.99
P2P Digital Currency
Typedefs | Functions | Variables
coin_selection.cpp File Reference
#include <bench/bench.h>
#include <interfaces/chain.h>
#include <node/context.h>
#include <wallet/coinselection.h>
#include <wallet/wallet.h>
#include <set>
Include dependency graph for coin_selection.cpp:

Go to the source code of this file.

Typedefs

typedef std::set< CInputCoinCoinSet
 

Functions

static void addCoin (const CAmount &nValue, const CWallet &wallet, std::vector< std::unique_ptr< CWalletTx >> &wtxs)
 
static void CoinSelection (benchmark::State &state)
 
static CWallet testWallet (testChain.get(), WalletLocation(), WalletDatabase::CreateDummy())
 
static void add_coin (const CAmount &nValue, int nInput, std::vector< OutputGroup > &set)
 
static CAmount make_hard_case (int utxos, std::vector< OutputGroup > &utxo_pool)
 
static void BnBExhaustion (benchmark::State &state)
 
 BENCHMARK (CoinSelection, 650)
 
 BENCHMARK (BnBExhaustion, 650)
 

Variables

static NodeContext testNode
 
static auto testChain = interfaces::MakeChain(testNode)
 
std::vector< std::unique_ptr< CWalletTx > > wtxn
 

Typedef Documentation

◆ CoinSet

typedef std::set<CInputCoin> CoinSet

Definition at line 65 of file coin_selection.cpp.

Function Documentation

◆ add_coin()

static void add_coin ( const CAmount nValue,
int  nInput,
std::vector< OutputGroup > &  set 
)
static

Definition at line 72 of file coin_selection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCoin()

static void addCoin ( const CAmount nValue,
const CWallet wallet,
std::vector< std::unique_ptr< CWalletTx >> &  wtxs 
)
static

Definition at line 13 of file coin_selection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BENCHMARK() [1/2]

BENCHMARK ( CoinSelection  ,
650   
)
Here is the caller graph for this function:

◆ BENCHMARK() [2/2]

BENCHMARK ( BnBExhaustion  ,
650   
)

◆ BnBExhaustion()

static void BnBExhaustion ( benchmark::State state)
static

Definition at line 94 of file coin_selection.cpp.

Here is the call graph for this function:

◆ CoinSelection()

static void CoinSelection ( benchmark::State state)
static

Definition at line 30 of file coin_selection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_hard_case()

static CAmount make_hard_case ( int  utxos,
std::vector< OutputGroup > &  utxo_pool 
)
static

Definition at line 82 of file coin_selection.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testWallet()

static CWallet testWallet ( testChain.  get(),
WalletLocation()  ,
WalletDatabase::CreateDummy()   
)
static
Here is the caller graph for this function:

Variable Documentation

◆ testChain

auto testChain = interfaces::MakeChain(testNode)
static

Definition at line 67 of file coin_selection.cpp.

◆ testNode

NodeContext testNode
static

Definition at line 66 of file coin_selection.cpp.

◆ wtxn

std::vector<std::unique_ptr<CWalletTx> > wtxn

Definition at line 69 of file coin_selection.cpp.