Fix linker error: move extern txdb declaration out of UtxoSnapshot namespace

The extern declaration for the global leveldb::DB *txdb was inside
namespace UtxoSnapshot{}, causing the linker to look for
UtxoSnapshot::txdb instead of the global ::txdb defined in
txdb-leveldb.cpp.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 02:39:37 -07:00
parent 64939a9793
commit a792f90489
+3 -3
View File
@@ -25,6 +25,9 @@
namespace fs = boost::filesystem;
// Global LevelDB pointer (defined in txdb-leveldb.cpp)
extern leveldb::DB *txdb;
namespace UtxoSnapshot {
// ---------------------------------------------------------------------------
@@ -124,9 +127,6 @@ bool DumpSnapshot(const fs::path& destPath,
// Write UTXO section using LevelDB iterator (same pattern as SumUtxoValues)
{
// Access the global LevelDB directly via a CTxDB instance
// We need a raw iterator, so we re-implement the iteration pattern
extern leveldb::DB *txdb;
CDataStream ssKeyPrefix(SER_DISK, CLIENT_VERSION);
ssKeyPrefix << std::make_pair(std::string("u"), std::make_pair(uint256(0), (unsigned int)0));