![]() |
PIVX Core
5.6.99
P2P Digital Currency
|
#include "test/test_pivx.h"#include "coins.h"#include "script/standard.h"#include "uint256.h"#include "undo.h"#include "utilstrencodings.h"#include "random.h"#include "sapling/incrementalmerkletree.h"#include <vector>#include <map>#include <boost/test/unit_test.hpp>Go to the source code of this file.
Classes | |
| class | SingleEntryCacheTest |
Typedefs | |
| typedef std::map< COutPoint, std::tuple< CTransaction, CTxUndo, Coin > > | UtxoData |
Functions | |
| int | ApplyTxInUndo (Coin &&undo, CCoinsViewCache &view, const COutPoint &out) |
| Restore the UTXO in a Coin at a given COutPoint. More... | |
| void | UpdateCoins (const CTransaction &tx, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight, bool fSkipInvalid=false) |
| template<typename Tree > | |
| bool | GetAnchorAt (const CCoinsViewCache &cache, const uint256 &rt, Tree &tree) |
| template<> | |
| bool | GetAnchorAt (const CCoinsViewCache &cache, const uint256 &rt, SaplingMerkleTree &tree) |
| void | checkNullifierCache (const CCoinsViewCache &cache, const TxWithNullifiers &txWithNullifiers, bool shouldBeInCache) |
| BOOST_AUTO_TEST_CASE (nullifier_regression_test) | |
| template<typename Tree > | |
| void | anchorPopRegressionTestImpl () |
| BOOST_AUTO_TEST_CASE (anchor_pop_regression_test) | |
| template<typename Tree > | |
| void | anchorRegressionTestImpl () |
| BOOST_AUTO_TEST_CASE (anchor_regression_test) | |
| BOOST_AUTO_TEST_CASE (nullifiers_test) | |
| template<typename Tree > | |
| void | anchorsFlushImpl () |
| BOOST_AUTO_TEST_CASE (anchors_flush_test) | |
| template<typename Tree > | |
| void | anchorsTestImpl () |
| BOOST_AUTO_TEST_CASE (anchors_test) | |
| BOOST_AUTO_TEST_CASE (coins_cache_simulation_test) | |
| UtxoData::iterator | FindRandomFrom (const std::set< COutPoint > &utxoSet) |
| BOOST_AUTO_TEST_CASE (updatecoins_simulation_test) | |
| BOOST_AUTO_TEST_CASE (ccoins_serialization) | |
| void | SetCoinsValue (CAmount value, Coin &coin) |
| size_t | InsertCoinsMapEntry (CCoinsMap &map, CAmount value, char flags) |
| void | GetCoinsMapEntry (const CCoinsMap &map, CAmount &value, char &flags) |
| void | WriteCoinsViewEntry (CCoinsView &view, CAmount value, char flags) |
| void | CheckAccessCoin (CAmount base_value, CAmount cache_value, CAmount expected_value, char cache_flags, char expected_flags) |
| BOOST_AUTO_TEST_CASE (ccoins_access) | |
| void | CheckSpendCoins (CAmount base_value, CAmount cache_value, CAmount expected_value, char cache_flags, char expected_flags) |
| BOOST_AUTO_TEST_CASE (ccoins_spend) | |
| void | CheckAddCoinBase (CAmount base_value, CAmount cache_value, CAmount modify_value, CAmount expected_value, char cache_flags, char expected_flags) |
| template<typename... Args> | |
| void | CheckAddCoin (Args &&... args) |
| BOOST_AUTO_TEST_CASE (ccoins_add) | |
| void | CheckWriteCoins (CAmount parent_value, CAmount child_value, CAmount expected_value, char parent_flags, char child_flags, char expected_flags) |
| BOOST_AUTO_TEST_CASE (ccoins_write) | |
Variables | |
| UtxoData | utxoData |
| typedef std::map<COutPoint, std::tuple<CTransaction,CTxUndo,Coin> > UtxoData |
Definition at line 761 of file coins_tests.cpp.
| void anchorPopRegressionTestImpl | ( | ) |
| void anchorRegressionTestImpl | ( | ) |
| void anchorsFlushImpl | ( | ) |
| void anchorsTestImpl | ( | ) |
Definition at line 539 of file coins_tests.cpp.
| int ApplyTxInUndo | ( | Coin && | undo, |
| CCoinsViewCache & | view, | ||
| const COutPoint & | out | ||
| ) |
Restore the UTXO in a Coin at a given COutPoint.
| undo | The Coin to be restored. |
| view | The coins view to which to apply the changes. |
| out | The out point that corresponds to the tx input. |
Definition at line 1255 of file validation.cpp.
| BOOST_AUTO_TEST_CASE | ( | anchor_pop_regression_test | ) |
Definition at line 389 of file coins_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | anchor_regression_test | ) |
Definition at line 476 of file coins_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | anchors_flush_test | ) |
Definition at line 534 of file coins_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | anchors_test | ) |
Definition at line 609 of file coins_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | ccoins_access | ) |
| BOOST_AUTO_TEST_CASE | ( | ccoins_add | ) |
| BOOST_AUTO_TEST_CASE | ( | ccoins_serialization | ) |
| BOOST_AUTO_TEST_CASE | ( | ccoins_spend | ) |
| BOOST_AUTO_TEST_CASE | ( | ccoins_write | ) |
| BOOST_AUTO_TEST_CASE | ( | coins_cache_simulation_test | ) |
Definition at line 625 of file coins_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | nullifier_regression_test | ) |
| BOOST_AUTO_TEST_CASE | ( | nullifiers_test | ) |
| BOOST_AUTO_TEST_CASE | ( | updatecoins_simulation_test | ) |
Definition at line 778 of file coins_tests.cpp.
| void CheckAddCoin | ( | Args &&... | args | ) |
| void CheckAddCoinBase | ( | CAmount | base_value, |
| CAmount | cache_value, | ||
| CAmount | modify_value, | ||
| CAmount | expected_value, | ||
| char | cache_flags, | ||
| char | expected_flags | ||
| ) |
Definition at line 1182 of file coins_tests.cpp.
| void checkNullifierCache | ( | const CCoinsViewCache & | cache, |
| const TxWithNullifiers & | txWithNullifiers, | ||
| bool | shouldBeInCache | ||
| ) |
| UtxoData::iterator FindRandomFrom | ( | const std::set< COutPoint > & | utxoSet | ) |
| bool GetAnchorAt | ( | const CCoinsViewCache & | cache, |
| const uint256 & | rt, | ||
| SaplingMerkleTree & | tree | ||
| ) |
| bool GetAnchorAt | ( | const CCoinsViewCache & | cache, |
| const uint256 & | rt, | ||
| Tree & | tree | ||
| ) |
Definition at line 1040 of file coins_tests.cpp.
Definition at line 1013 of file coins_tests.cpp.
| void UpdateCoins | ( | const CTransaction & | tx, |
| CCoinsViewCache & | inputs, | ||
| CTxUndo & | txundo, | ||
| int | nHeight, | ||
| bool | fSkipInvalid = false |
||
| ) |
Definition at line 1014 of file validation.cpp.
| void WriteCoinsViewEntry | ( | CCoinsView & | view, |
| CAmount | value, | ||
| char | flags | ||
| ) |
Definition at line 1057 of file coins_tests.cpp.
| UtxoData utxoData |
Definition at line 762 of file coins_tests.cpp.