Add src/node/* code to node:: namespace

This commit is contained in:
Russell Yanofsky
2021-11-12 10:06:00 -05:00
parent 4ada74206a
commit 90fc8b089d
77 changed files with 283 additions and 61 deletions

View File

@@ -14,6 +14,8 @@
#include <validation.h> // For g_chainman
#include <warnings.h>
using node::ReadBlockFromDisk;
constexpr uint8_t DB_BEST_BLOCK{'B'};
constexpr int64_t SYNC_LOG_INTERVAL = 30; // seconds

View File

@@ -9,6 +9,8 @@
#include <node/blockstorage.h>
#include <util/system.h>
using node::UndoReadFromDisk;
/* The index database stores three items for each block: the disk location of the encoded filter,
* its dSHA256 hash, and the header. Those belonging to blocks on the active chain are indexed by
* height, and those belonging to blocks that have been reorganized out of the active chain are

View File

@@ -12,6 +12,12 @@
#include <undo.h>
#include <validation.h>
using node::CCoinsStats;
using node::GetBogoSize;
using node::ReadBlockFromDisk;
using node::TxOutSer;
using node::UndoReadFromDisk;
static constexpr uint8_t DB_BLOCK_HASH{'s'};
static constexpr uint8_t DB_BLOCK_HEIGHT{'t'};
static constexpr uint8_t DB_MUHASH{'M'};

View File

@@ -52,7 +52,7 @@ public:
explicit CoinStatsIndex(size_t n_cache_size, bool f_memory = false, bool f_wipe = false);
// Look up stats for a specific block using CBlockIndex
bool LookUpStats(const CBlockIndex* block_index, CCoinsStats& coins_stats) const;
bool LookUpStats(const CBlockIndex* block_index, node::CCoinsStats& coins_stats) const;
};
/// The global UTXO set hash object.

View File

@@ -9,6 +9,8 @@
#include <util/system.h>
#include <validation.h>
using node::OpenBlockFile;
constexpr uint8_t DB_TXINDEX{'t'};
std::unique_ptr<TxIndex> g_txindex;