mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-11 21:22:47 +01:00
Merge #10195: Switch chainstate db and cache to per-txout model
589827975scripted-diff: various renames for per-utxo consistency (Pieter Wuille)a5e02bc7fIncrease travis unit test timeout (Pieter Wuille)73de2c1ffRename CCoinsCacheEntry::coins to coin (Pieter Wuille)119e552f7Merge CCoinsViewCache's GetOutputFor and AccessCoin (Pieter Wuille)580b02309[MOVEONLY] Move old CCoins class to txdb.cpp (Pieter Wuille)8b25d2c0cUpgrade from per-tx database to per-txout (Pieter Wuille)b2af357f3Reduce reserved memory space for flushing (Pieter Wuille)41aa5b79aPack Coin more tightly (Pieter Wuille)97072d668Remove unused CCoins methods (Pieter Wuille)ce23efaa5Extend coins_tests (Pieter Wuille)508307968Switch CCoinsView and chainstate db from per-txid to per-txout (Pieter Wuille)4ec0d9e79Refactor GetUTXOStats in preparation for per-COutPoint iteration (Pieter Wuille)13870b56fReplace CCoins-based CTxMemPool::pruneSpent with isSpent (Pieter Wuille)05293f3cbRemove ModifyCoins/ModifyNewCoins (Pieter Wuille)961e48397Switch tests from ModifyCoins to AddCoin/SpendCoin (Pieter Wuille)8b3868c1bSwitch CScriptCheck to use Coin instead of CCoins (Pieter Wuille)c87b957a3Only pass things committed to by tx's witness hash to CScriptCheck (Matt Corallo)f68cdfe92Switch from per-tx to per-txout CCoinsViewCache methods in some places (Pieter Wuille)000391132Introduce new per-txout CCoinsViewCache functions (Pieter Wuille)bd83111a0Optimization: Coin&& to ApplyTxInUndo (Pieter Wuille)cb2c7fdacReplace CTxInUndo with Coin (Pieter Wuille)422634e2fIntroduce Coin, a single unspent output (Pieter Wuille)7d991b55dStore/allow tx metadata in all undo records (Pieter Wuille)c3aa0c119Report on-disk size in gettxoutsetinfo (Pieter Wuille)d34242430Remove/ignore tx version in utxo and undo (Pieter Wuille)7e0032290Add specialization of SipHash for 256 + 32 bit data (Pieter Wuille)e484652fcIntroduce CHashVerifier to hash read data (Pieter Wuille)f54580e7eerror() in disconnect for disk corruption, not inconsistency (Pieter Wuille)e66dbde6dAdd SizeEstimate to CDBBatch (Pieter Wuille) Tree-SHA512: ce1fb1e40c77d38915cd02189fab7a8b125c7f44d425c85579d872c3bede3a437760997907c99d7b3017ced1c2de54b2ac7223d99d83a6658fe5ef61edef1de3
This commit is contained in:
10
src/init.cpp
10
src/init.cpp
@@ -146,9 +146,9 @@ class CCoinsViewErrorCatcher : public CCoinsViewBacked
|
||||
{
|
||||
public:
|
||||
CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}
|
||||
bool GetCoins(const uint256 &txid, CCoins &coins) const {
|
||||
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override {
|
||||
try {
|
||||
return CCoinsViewBacked::GetCoins(txid, coins);
|
||||
return CCoinsViewBacked::GetCoin(outpoint, coin);
|
||||
} catch(const std::runtime_error& e) {
|
||||
uiInterface.ThreadSafeMessageBox(_("Error reading from database, shutting down."), "", CClientUIInterface::MSG_ERROR);
|
||||
LogPrintf("Error reading from database: %s\n", e.what());
|
||||
@@ -1450,6 +1450,12 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
//If we're reindexing in prune mode, wipe away unusable block files and all undo data files
|
||||
if (fPruneMode)
|
||||
CleanupBlockRevFiles();
|
||||
} else {
|
||||
// If necessary, upgrade from older database format.
|
||||
if (!pcoinsdbview->Upgrade()) {
|
||||
strLoadError = _("Error upgrading chainstate database");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!LoadBlockIndex(chainparams)) {
|
||||
|
||||
Reference in New Issue
Block a user