8#include <chainparams.h>
26#include <validation.h>
83 for (
int i = 0; i < 50; ++i) {
101 context.
chainman->ActiveChain().SetTip(*pindex);
124 wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
125 wallet.SetupDescriptorScriptPubKeyMans();
132 const auto& params =
Params();
135 for (
unsigned int i = 0; i <
chain_size; ++i) {
153 for (
int i=0; i <
preset_inputs->num_of_internal_inputs; i++) {
155 target += coin.txout.nValue;
162 std::vector<wallet::CRecipient> recipients = {{dest,
target,
true}};
179 wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
180 wallet.SetupDescriptorScriptPubKeyMans();
191 const auto& params =
Params();
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
const CChainParams & Params()
Return the currently selected parameters.
std::vector< CTransactionRef > vtx
The block chain is a tree shaped structure starting with the genesis block at the root,...
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
const CBlock & GenesisBlock() const
Serialized script, used inside transaction inputs and outputs.
Main entry point to nanobench's benchmarking facility.
void emplace_back(Args &&... args)
bool m_allow_other_inputs
If true, the selection process can add extra unselected inputs from the wallet while requires all sel...
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
static const int COINBASE_MATURITY
Coinbase transaction outputs can only be spent after this number of new blocks (network rule)
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
is a home for simple enum and struct type definitions that can be used internally by functions in the...
interfaces::BlockInfo MakeBlockInfo(const CBlockIndex *index, const CBlock *data)
Return data from block index.
std::unique_ptr< WalletDatabase > CreateMockableWalletDatabase(MockableData records)
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
CoinsResult AvailableCoins(const CWallet &wallet, const CCoinControl *coinControl, std::optional< CFeeRate > feerate, const CoinFilterParams ¶ms)
Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
A mutable version of CTransaction.
Information about chainstate that notifications are sent from.
NodeContext struct containing references to chain state and connection state.
std::unique_ptr< ChainstateManager > chainman
CAmount GetTotalAmount() const
#define WITH_LOCK(cs, code)
Run code while locking a mutex.
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
static const int32_t VERSIONBITS_LAST_OLD_BLOCK_VERSION
What block version to use for new blocks (pre versionbits)
static void WalletCreateTxUsePresetInputsAndCoinSelection(benchmark::Bench &bench)
static void WalletAvailableCoins(benchmark::Bench &bench)
TipBlock getTip(const CChainParams ¶ms, const node::NodeContext &context)
void generateFakeBlock(const CChainParams ¶ms, const node::NodeContext &context, CWallet &wallet, const CScript &coinbase_out_script)
static void WalletCreateTx(benchmark::Bench &bench, const OutputType output_type, bool allow_other_inputs, std::optional< PreSelectInputs > preset_inputs)
static void AvailableCoins(benchmark::Bench &bench, const std::vector< OutputType > &output_type)
static void WalletCreateTxUseOnlyPresetInputs(benchmark::Bench &bench)