95 bench.unit(
"input").run([&] {
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
static void BIP352_GetPubKey_P2PKH(benchmark::Bench &bench)
static void BIP352_GetPubKey_P2PKH_WorstCase(benchmark::Bench &bench)
static const std::vector< unsigned char > DUMMY_ECDSA_SIG(71, 0x01)
static void BIP352_GetPubKey_P2SH_P2WPKH(benchmark::Bench &bench)
static const std::vector< unsigned char > DUMMY_SCHNORR_SIG(64, 0x01)
static void BIP352_GetPubKey_P2TR(benchmark::Bench &bench)
static void BIP352_GetPubKey_P2WPKH(benchmark::Bench &bench)
static void GetPubKeyBench(benchmark::Bench &bench, InputType input_type)
static const CScript DUMMY_LEAF_SCRIPT
#define Assert(val)
Identity function.
CPubKey GetPubKey() const
Compute the public key from a private key.
An encapsulated public key.
static constexpr unsigned int COMPRESSED_SIZE
Serialized script, used inside transaction inputs and outputs.
An input of a transaction.
RAII class initializing and deinitializing global state for elliptic curve support.
Main entry point to nanobench's benchmarking facility.
constexpr uint8_t TAPROOT_LEAF_TAPSCRIPT
CKey GenerateRandomKey(bool compressed) noexcept
void doNotOptimizeAway(Arg &&arg)
Makes sure none of the given arguments are optimized away by the compiler.
std::optional< PubKey > GetPubKeyFromInput(const CTxIn &txin, const CScript &spk)
Get the public key from an input.
std::variant< CPubKey, XOnlyPubKey > PubKey
constexpr int MAX_SCRIPT_SIZE
constexpr int MAX_STACK_SIZE
std::vector< unsigned char > ToByteVector(const T &in)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.