Bitcoin Core  22.99.0
P2P Digital Currency
wallet_transaction_tests.cpp
Go to the documentation of this file.
1 // Copyright (c) 2021 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #include <wallet/transaction.h>
6 
8 
9 #include <boost/test/unit_test.hpp>
10 
11 namespace wallet {
12 BOOST_FIXTURE_TEST_SUITE(wallet_transaction_tests, WalletTestingSetup)
13 
15 {
16  for (uint8_t hash = 0; hash < 5; ++hash) {
17  for (int index = -2; index < 3; ++index) {
21  }
22  }
23 }
24 
26 } // namespace wallet
wallet
Definition: node.h:38
BOOST_FIXTURE_TEST_SUITE
#define BOOST_FIXTURE_TEST_SUITE(a, b)
Definition: object.cpp:14
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END()
wallet::TxStateSerializedBlockHash
static uint256 TxStateSerializedBlockHash(const TxState &state)
Get TxState serialized block hash. Inverse of TxStateInterpretSerialized.
Definition: transaction.h:87
wallet::TxStateUnrecognized
State of transaction loaded in an unrecognized state with unexpected hash or index values.
Definition: transaction.h:58
uint256
256-bit opaque blob.
Definition: uint256.h:124
wallet::TxState
std::variant< TxStateConfirmed, TxStateInMempool, TxStateConflicted, TxStateInactive, TxStateUnrecognized > TxState
All possible CWalletTx states.
Definition: transaction.h:66
wallet_test_fixture.h
wallet::TxStateInterpretSerialized
static TxState TxStateInterpretSerialized(TxStateUnrecognized data)
Try to interpret deserialized TxStateUnrecognized data as a recognized state.
Definition: transaction.h:72
wallet::BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(bnb_search_test)
Definition: coinselector_tests.cpp:177
transaction.h
wallet::TxStateSerializedIndex
static int TxStateSerializedIndex(const TxState &state)
Get TxState serialized block index. Inverse of TxStateInterpretSerialized.
Definition: transaction.h:99
BOOST_CHECK_EQUAL
#define BOOST_CHECK_EQUAL(v1, v2)
Definition: object.cpp:18