13#include <boost/test/unit_test.hpp>
20 for (uint8_t hash = 0; hash < 5; ++hash) {
21 for (
int index = -2; index < 3; ++index) {
46 BOOST_REQUIRE(tx_b->GetHash() != tx_a->GetHash());
49 std::map<Wtxid, CTransactionRef> bad_variants{{tx_b->GetWitnessHash(), tx_b}};
52 BOOST_FAIL(
"expected std::runtime_error was not thrown");
53 }
catch (
const std::runtime_error& e) {
54 BOOST_CHECK_EQUAL(std::string(e.what()),
"variant txid does not match wallet txid");
static constexpr CAmount COIN
The amount of satoshis in one BTC.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
Double ended buffer combining vector and stream-like interfaces.
static transaction_identifier FromUint256(const uint256 &id)
A transaction with a bunch of additional info that only the owner cares about.
BOOST_FIXTURE_TEST_SUITE(cuckoocache_tests, BasicTestingSetup)
Test Suite for CuckooCache.
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(headers.FindFirst("key"), "value")
std::variant< TxStateConfirmed, TxStateInMempool, TxStateBlockConflicted, TxStateInactive, TxStateUnrecognized > TxState
All possible CWalletTx states.
static int TxStateSerializedIndex(const TxState &state)
Get TxState serialized block index. Inverse of TxStateInterpretSerialized.
static TxState TxStateInterpretSerialized(TxStateUnrecognized data)
Try to interpret deserialized TxStateUnrecognized data as a recognized state.
BOOST_AUTO_TEST_CASE(bnb_test)
static uint256 TxStateSerializedBlockHash(const TxState &state)
Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.
static CTransactionRef MakeTransactionRef(Tx &&txIn)
std::shared_ptr< const CTransaction > CTransactionRef
constexpr deserialize_type deserialize
A mutable version of CTransaction.
std::vector< CTxOut > vout
State of transaction not confirmed or conflicting with a known block and not in the mempool.
State of transaction loaded in an unrecognized state with unexpected hash or index values.