![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "wallet/test/wallet_test_fixture.h"#include "consensus/merkle.h"#include "rpc/server.h"#include "txmempool.h"#include "validation.h"#include "wallet/wallet.h"#include "wallet/walletutil.h"#include <set>#include <utility>#include <vector>#include <boost/test/unit_test.hpp>#include <univalue.h>Go to the source code of this file.
Macros | |
| #define | RUN_TESTS 100 |
| #define | RANDOM_REPEATS 5 |
Typedefs | |
| typedef std::set< std::pair< const CWalletTx *, unsigned int > > | CoinSet |
Functions | |
| UniValue | importmulti (const JSONRPCRequest &request) |
| UniValue | dumpwallet (const JSONRPCRequest &request) |
| UniValue | importwallet (const JSONRPCRequest &request) |
| BOOST_AUTO_TEST_CASE (coin_selection_tests) | |
| BOOST_FIXTURE_TEST_CASE (rescan, TestChain100Setup) | |
| BOOST_FIXTURE_TEST_CASE (importwallet_rescan, TestChain100Setup) | |
| void | removeTxFromMempool (CWalletTx &wtx) |
| CBlockIndex * | SimpleFakeMine (CWalletTx &wtx, CWallet &wallet, CBlockIndex *pprev=nullptr) |
| Mimic block creation. More... | |
| void | fakeMempoolInsertion (const CTransactionRef &wtxCredit) |
| CWalletTx & | BuildAndLoadTxToWallet (const std::vector< CTxIn > &vin, const std::vector< CTxOut > &vout, CWallet &wallet) |
| CWalletTx & | ReceiveBalanceWith (const std::vector< CTxOut > &vout, CWallet &wallet) |
| void | CheckBalances (const CWalletTx &tx, const CAmount &nCreditAll, const CAmount &nCreditSpendable, const CAmount &nAvailableCredit, const CAmount &nDebitAll, const CAmount &nDebitSpendable) |
| BOOST_AUTO_TEST_CASE (cached_balances_tests) | |
| Validates the correct behaviour of the CWalletTx "standard" balance methods. More... | |
Variables | |
| std::vector< std::unique_ptr< CWalletTx > > | wtxn |
| #define RANDOM_REPEATS 5 |
Definition at line 31 of file wallet_tests.cpp.
| #define RUN_TESTS 100 |
Definition at line 27 of file wallet_tests.cpp.
Definition at line 35 of file wallet_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | cached_balances_tests | ) |
Validates the correct behaviour of the CWalletTx "standard" balance methods.
(where "standard" is defined by direct P2PKH scripts, no P2CS contracts nor other types)
1) CWalletTx::GetCredit. 2) CWalletTx::GetDebit. 4) CWalletTx::GetAvailableCredit 3) CWallet::GetUnconfirmedBalance.
Definition at line 569 of file wallet_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | coin_selection_tests | ) |
Definition at line 75 of file wallet_tests.cpp.
| BOOST_FIXTURE_TEST_CASE | ( | importwallet_rescan | , |
| TestChain100Setup | |||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | rescan | , |
| TestChain100Setup | |||
| ) |
Definition at line 348 of file wallet_tests.cpp.
| UniValue dumpwallet | ( | const JSONRPCRequest & | request | ) |
| void fakeMempoolInsertion | ( | const CTransactionRef & | wtxCredit | ) |
Definition at line 515 of file wallet_tests.cpp.
| UniValue importmulti | ( | const JSONRPCRequest & | request | ) |
| UniValue importwallet | ( | const JSONRPCRequest & | request | ) |
Definition at line 330 of file rpcdump.cpp.
| void removeTxFromMempool | ( | CWalletTx & | wtx | ) |
Definition at line 482 of file wallet_tests.cpp.
| CBlockIndex* SimpleFakeMine | ( | CWalletTx & | wtx, |
| CWallet & | wallet, | ||
| CBlockIndex * | pprev = nullptr |
||
| ) |
Mimic block creation.
Definition at line 496 of file wallet_tests.cpp.
| std::vector<std::unique_ptr<CWalletTx> > wtxn |
Definition at line 33 of file wallet_tests.cpp.