|
| 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) |
| |
| | BOOST_FIXTURE_TEST_CASE (coins_cache_base_simulation_test, CacheTest) |
| |
| | BOOST_FIXTURE_TEST_CASE (coins_cache_dbbase_simulation_test, CacheTest) |
| |
| | BOOST_FIXTURE_TEST_CASE (updatecoins_simulation_test, UpdateTest) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_serialization) |
| |
| static void | SetCoinsValue (const CAmount value, Coin &coin) |
| |
| static size_t | InsertCoinsMapEntry (CCoinsMap &map, CoinsCachePair &sentinel, const CoinEntry &cache_coin) |
| |
| static MaybeCoin | GetCoinsMapEntry (const CCoinsMap &map, const COutPoint &outp=OUTPOINT) |
| |
| static void | WriteCoinsViewEntry (CCoinsView &view, const MaybeCoin &cache_coin) |
| |
| static void | CheckAccessCoin (const CAmount base_value, const MaybeCoin &cache_coin, const MaybeCoin &expected) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_access) |
| |
| static void | CheckSpendCoins (const CAmount base_value, const MaybeCoin &cache_coin, const MaybeCoin &expected) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_spend) |
| |
| static void | CheckAddCoin (const CAmount base_value, const MaybeCoin &cache_coin, const CAmount modify_value, const CoinOrError &expected, const bool coinbase) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_add) |
| |
| static void | CheckWriteCoins (const MaybeCoin &parent, const MaybeCoin &child, const CoinOrError &expected) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_write) |
| |
| | BOOST_FIXTURE_TEST_CASE (ccoins_flush_behavior, FlushTest) |
| |
| | BOOST_AUTO_TEST_CASE (coins_resource_is_used) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_addcoin_exception_keeps_usage_balanced) |
| |
| | BOOST_AUTO_TEST_CASE (ccoins_emplace_duplicate_keeps_usage_balanced) |
| |
|
| static const unsigned int | NUM_SIMULATION_ITERATIONS = 40000 |
| |
| static const COutPoint | OUTPOINT |
| |
| constexpr CAmount | SPENT {-1} |
| |
| constexpr CAmount | ABSENT {-2} |
| |
| constexpr CAmount | VALUE1 {100} |
| |
| constexpr CAmount | VALUE2 {200} |
| |
| constexpr CAmount | VALUE3 {300} |
| |
| constexpr MaybeCoin | MISSING {std::nullopt} |
| |
| constexpr MaybeCoin | SPENT_DIRTY {{SPENT, CoinEntry::State::DIRTY}} |
| |
| constexpr MaybeCoin | SPENT_DIRTY_FRESH {{SPENT, CoinEntry::State::DIRTY_FRESH}} |
| |
| constexpr MaybeCoin | SPENT_FRESH {{SPENT, CoinEntry::State::FRESH}} |
| |
| constexpr MaybeCoin | SPENT_CLEAN {{SPENT, CoinEntry::State::CLEAN}} |
| |
| constexpr MaybeCoin | VALUE1_DIRTY {{VALUE1, CoinEntry::State::DIRTY}} |
| |
| constexpr MaybeCoin | VALUE1_DIRTY_FRESH {{VALUE1, CoinEntry::State::DIRTY_FRESH}} |
| |
| constexpr MaybeCoin | VALUE1_FRESH {{VALUE1, CoinEntry::State::FRESH}} |
| |
| constexpr MaybeCoin | VALUE1_CLEAN {{VALUE1, CoinEntry::State::CLEAN}} |
| |
| constexpr MaybeCoin | VALUE2_DIRTY {{VALUE2, CoinEntry::State::DIRTY}} |
| |
| constexpr MaybeCoin | VALUE2_DIRTY_FRESH {{VALUE2, CoinEntry::State::DIRTY_FRESH}} |
| |
| constexpr MaybeCoin | VALUE2_FRESH {{VALUE2, CoinEntry::State::FRESH}} |
| |
| constexpr MaybeCoin | VALUE2_CLEAN {{VALUE2, CoinEntry::State::CLEAN}} |
| |
| constexpr MaybeCoin | VALUE3_DIRTY {{VALUE3, CoinEntry::State::DIRTY}} |
| |
| constexpr MaybeCoin | VALUE3_DIRTY_FRESH {{VALUE3, CoinEntry::State::DIRTY_FRESH}} |
| |
| constexpr auto | EX_OVERWRITE_UNSPENT {"Attempted to overwrite an unspent coin (when possible_overwrite is false)"} |
| |
| constexpr auto | EX_FRESH_MISAPPLIED {"FRESH flag misapplied to coin that exists in parent cache"} |
| |