![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
#include <kernel/bitcoinkernel.h>#include <kernel/bitcoinkernel_wrapper.h>#include <boost/test/included/unit_test.hpp>#include <test/kernel/block_data.h>#include <charconv>#include <cstdint>#include <cstdlib>#include <filesystem>#include <format>#include <iostream>#include <memory>#include <optional>#include <random>#include <ranges>#include <span>#include <string>#include <string_view>#include <vector>Go to the source code of this file.
Classes | |
| class | TestLog |
| struct | TestDirectory |
| class | TestKernelNotifications |
| class | TestValidationInterface |
Concepts | |
| concept | HasToBytes |
Macros | |
| #define | BOOST_TEST_MODULE Bitcoin Kernel Test Suite |
Functions | |
| std::string | random_string (uint32_t length) |
| std::vector< std::byte > | hex_string_to_byte_vec (std::string_view hex) |
| std::string | byte_span_to_hex_string_reversed (std::span< const std::byte > bytes) |
| void | check_equal (std::span< const std::byte > _actual, std::span< const std::byte > _expected, bool equal=true) |
| void | run_verify_test (const ScriptPubkey &spent_script_pubkey, const Transaction &spending_tx, std::span< TransactionOutput > spent_outputs, int64_t amount, unsigned int input_index, bool taproot) |
| template<typename T > | |
| void | CheckHandle (T object, T distinct_object) |
| template<typename RangeType > requires std::ranges::random_access_range<RangeType> | |
| void | CheckRange (const RangeType &range, size_t expected_size) |
| BOOST_AUTO_TEST_CASE (btck_transaction_tests) | |
| BOOST_AUTO_TEST_CASE (btck_script_pubkey) | |
| BOOST_AUTO_TEST_CASE (btck_transaction_output) | |
| BOOST_AUTO_TEST_CASE (btck_transaction_input) | |
| BOOST_AUTO_TEST_CASE (btck_script_verify_tests) | |
| BOOST_AUTO_TEST_CASE (logging_tests) | |
| BOOST_AUTO_TEST_CASE (btck_context_tests) | |
| BOOST_AUTO_TEST_CASE (btck_block) | |
| Context | create_context (std::shared_ptr< TestKernelNotifications > notifications, ChainType chain_type, std::shared_ptr< TestValidationInterface > validation_interface=nullptr) |
| BOOST_AUTO_TEST_CASE (btck_chainman_tests) | |
| std::unique_ptr< ChainMan > | create_chainman (TestDirectory &test_directory, bool reindex, bool wipe_chainstate, bool block_tree_db_in_memory, bool chainstate_db_in_memory, Context &context) |
| void | chainman_reindex_test (TestDirectory &test_directory) |
| void | chainman_reindex_chainstate_test (TestDirectory &test_directory) |
| void | chainman_mainnet_validation_test (TestDirectory &test_directory) |
| BOOST_AUTO_TEST_CASE (btck_chainman_mainnet_tests) | |
| BOOST_AUTO_TEST_CASE (btck_block_hash_tests) | |
| BOOST_AUTO_TEST_CASE (btck_chainman_in_memory_tests) | |
| BOOST_AUTO_TEST_CASE (btck_chainman_regtest_tests) | |
Variables | |
| constexpr auto | VERIFY_ALL_PRE_SEGWIT |
| constexpr auto | VERIFY_ALL_PRE_TAPROOT {VERIFY_ALL_PRE_SEGWIT | ScriptVerificationFlags::WITNESS} |
| #define BOOST_TEST_MODULE Bitcoin Kernel Test Suite |
Definition at line 8 of file test_kernel.cpp.
| BOOST_AUTO_TEST_CASE | ( | btck_block | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_block_hash_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_chainman_in_memory_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_chainman_mainnet_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_chainman_regtest_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_chainman_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_context_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_script_pubkey | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_script_verify_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_transaction_input | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_transaction_output | ) |
| BOOST_AUTO_TEST_CASE | ( | btck_transaction_tests | ) |
| BOOST_AUTO_TEST_CASE | ( | logging_tests | ) |
| std::string byte_span_to_hex_string_reversed | ( | std::span< const std::byte > | bytes | ) |
| void chainman_mainnet_validation_test | ( | TestDirectory & | test_directory | ) |
Definition at line 709 of file test_kernel.cpp.
| void chainman_reindex_chainstate_test | ( | TestDirectory & | test_directory | ) |
Definition at line 698 of file test_kernel.cpp.
| void chainman_reindex_test | ( | TestDirectory & | test_directory | ) |
Definition at line 655 of file test_kernel.cpp.
| void check_equal | ( | std::span< const std::byte > | _actual, |
| std::span< const std::byte > | _expected, | ||
| bool | equal = true |
||
| ) |
| void CheckHandle | ( | T | object, |
| T | distinct_object | ||
| ) |
Definition at line 274 of file test_kernel.cpp.
| void CheckRange | ( | const RangeType & | range, |
| size_t | expected_size | ||
| ) |
| std::unique_ptr< ChainMan > create_chainman | ( | TestDirectory & | test_directory, |
| bool | reindex, | ||
| bool | wipe_chainstate, | ||
| bool | block_tree_db_in_memory, | ||
| bool | chainstate_db_in_memory, | ||
| Context & | context | ||
| ) |
| Context create_context | ( | std::shared_ptr< TestKernelNotifications > | notifications, |
| ChainType | chain_type, | ||
| std::shared_ptr< TestValidationInterface > | validation_interface = nullptr |
||
| ) |
| std::vector< std::byte > hex_string_to_byte_vec | ( | std::string_view | hex | ) |
| std::string random_string | ( | uint32_t | length | ) |
| void run_verify_test | ( | const ScriptPubkey & | spent_script_pubkey, |
| const Transaction & | spending_tx, | ||
| std::span< TransactionOutput > | spent_outputs, | ||
| int64_t | amount, | ||
| unsigned int | input_index, | ||
| bool | taproot | ||
| ) |
Definition at line 219 of file test_kernel.cpp.
|
constexpr |
Definition at line 78 of file test_kernel.cpp.
|
constexpr |
Definition at line 81 of file test_kernel.cpp.