mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
refactor: Move block storage globals to blockstorage
However, keep a declaration in validation to make it possible to move smaller chunks to blockstorage without breaking compilation. Also, expose AbortNode in the header. Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
This commit is contained in:
@@ -21,6 +21,23 @@ bool fHavePruned = false;
|
||||
bool fPruneMode = false;
|
||||
uint64_t nPruneTarget = 0;
|
||||
|
||||
// TODO make namespace {
|
||||
RecursiveMutex cs_LastBlockFile;
|
||||
std::vector<CBlockFileInfo> vinfoBlockFile;
|
||||
int nLastBlockFile = 0;
|
||||
/** Global flag to indicate we should check to see if there are
|
||||
* block/undo files that should be deleted. Set on startup
|
||||
* or if we allocate more file space when we're in prune mode
|
||||
*/
|
||||
bool fCheckForPruning = false;
|
||||
|
||||
/** Dirty block index entries. */
|
||||
std::set<CBlockIndex*> setDirtyBlockIndex;
|
||||
|
||||
/** Dirty block file entries. */
|
||||
std::set<int> setDirtyFileInfo;
|
||||
// } // namespace
|
||||
|
||||
bool IsBlockPruned(const CBlockIndex* pblockindex)
|
||||
{
|
||||
return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0);
|
||||
|
||||
Reference in New Issue
Block a user