Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,8 @@ dash_util_LDADD += $(BOOST_LIBS)
# dash-chainstate binary #
dash_chainstate_SOURCES = \
bitcoin-chainstate.cpp \
addressindex.cpp \
index/addressindex.cpp \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: dash_chainstate is missing index/addressindex_util.cpp — link will fail with undefined AddressBytesFromScript

The updated source list points at the real index/addressindex.cpp, but does not include its companion index/addressindex_util.cpp, which is the sole definition of AddressBytesFromScript (src/index/addressindex_util.cpp:12). That symbol is used 6 times in index/addressindex.cpp (lines 211, 232, 254, 313, 341, 368) and 3 times in txmempool.cpp (lines 555, 571, 626), both of which are compiled into dash_chainstate. Because dash-chainstate is linked from this explicit source list rather than against the server library where the helper is normally pulled in, building with --enable-experimental-util-chainstate will fail at link time with an unresolved AddressBytesFromScript symbol. The PR fixes make distdir but leaves the actual binary unbuildable, so the repair is incomplete. Add index/addressindex_util.cpp next to the address index source — it is already listed in libbitcoin_common_a_SOURCES (Makefile.am:540), confirming it is a standalone translation unit. Note: if spentindex.cpp / timestampindex.cpp end up transitively required by chainstate code paths they would need similar treatment, but addressindex_util.cpp is the unambiguous immediate gap.

Suggested change
index/addressindex.cpp \
bitcoin-chainstate.cpp \
index/addressindex.cpp \
index/addressindex_util.cpp \

source: ['claude', 'codex']

@thepastaclaw thepastaclaw Jun 6, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved by 7a87bacc5d4cb1d9b5bb3ebf68a9e41ddb7c4fc8_dash_chainstate now includes index/addressindex_util.cpp, so AddressBytesFromScript is provided.

Review-system reconciliation based on the latest commit diff.

index/addressindex_util.cpp \
arith_uint256.cpp \
base58.cpp \
batchedlogger.cpp \
Expand Down Expand Up @@ -1206,19 +1207,17 @@ dash_chainstate_SOURCES = \
evo/specialtxman.cpp \
flatfile.cpp \
fs.cpp \
governance/classes.cpp \
governance/common.cpp \
governance/exceptions.cpp \
governance/governance.cpp \
governance/object.cpp \
governance/validators.cpp \
governance/superblock.cpp \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

governance/superblock.cpp is a replacement for governance/governance.cpp for chainstate, not an addition:

-  governance/governance.cpp \

governance/vote.cpp \
governance/votedb.cpp \
gsl/assert.cpp \
hash.cpp \
index/base.cpp \
index/blockfilterindex.cpp \
index/coinstatsindex.cpp \
index/spentindex.cpp \
index/txindex.cpp \
instantsend/db.cpp \
instantsend/instantsend.cpp \
Expand Down
9 changes: 1 addition & 8 deletions src/bitcoin-chainstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <evo/chainhelper.h>
#include <evo/deterministicmns.h>
#include <evo/evodb.h>
#include <governance/governance.h>
#include <init/common.h>
#include <llmq/context.h>
#include <masternode/meta.h>
Expand Down Expand Up @@ -119,30 +118,24 @@ int main(int argc, char* argv[])
std::unique_ptr<CEvoDB> evodb;
std::unique_ptr<CDeterministicMNManager> dmnman;
CMasternodeSync mn_sync{std::make_unique<NullNodeSyncNotifier>()};
// govman captures dmnman by const-ref; the unique_ptr is empty here and
// filled later inside DashChainstateSetup (called by LoadChainstate).
CGovernanceManager govman(metaman, chainman, dmnman, mn_sync);
CSporkManager sporkman;
chainlock::Chainlocks chainlocks(sporkman);

std::unique_ptr<LLMQContext> llmq_ctx;
std::unique_ptr<CChainstateHelper> chain_helper;
auto rv = node::LoadChainstate(/*fReset=*/false,
std::ref(chainman),
govman,
metaman,
sporkman,
chainlocks,
mn_sync,
chain_helper,
dmnman,
evodb,
llmq_ctx,
/*mempool=*/nullptr,
gArgs.GetDataDirNet(),
/*fPruneMode=*/false,
/*is_addrindex_enabled=*/false,
/*is_spentindex_enabled=*/false,
/*is_timeindex_enabled=*/false,
chainparams.GetConsensus(),
/*fReindexChainState=*/false,
2 << 20,
Expand Down
Loading