This removes the remaining process-global index ownership and stores node-owned indexes in NodeContext instead.
Indexes moved:
g_txindexg_txospenderindexg_coin_stats_indexg_filter_indexes
NodeContext now owns these index instances, while node.indexes remains a non-owning list used for common index startup, shutdown, and getindexinfo handling.
Behavior should be unchanged, apart from the key order in getindexinfo output. Indexes are still created from the same startup options, started in the same init step, stopped before destruction, and destroyed while validation_signals is still alive so they can unregister safely.
The block filter index registry is moved to node/indexes.{h,cpp} so index/ code does not depend on NodeContext. PeerManager receives a small lookup callback instead of reaching into global state.
Review notes:
- The first four commits are small and mostly mechanical: move
txindex,txospenderindex, andcoinstatsindexownership toNodeContext, then makegetindexinfousenode.indexes. The first commit also adds custom deleters innode/indexes.cpp, sonode/context.cppdoes not include index headers, which would create circular dependencies. - The fifth commit adds a block filter index lookup callback to
PeerManager::Options, still backed by the global registry. - The last commit is the main one to review carefully. It moves block filter index ownership to
NodeContext, moves the block filter registry tonode/indexes.{h,cpp}, and points thePeerManagerlookup atNodeContextinstead of global state.