a60f863d3escripted-diff: Replace GenTxidVariant with GenTxid (marcofleon)c8ba199598Remove old GenTxid class (marcofleon)072a198ea4Convert remaining instances of GenTxid to GenTxidVariant (marcofleon)1b528391c7Convert `txrequest` to GenTxidVariant (marcofleon)bde4579b07Convert `txdownloadman_impl` to GenTxidVariant (marcofleon)c876a892ecReplace GenTxid with Txid/Wtxid overloads in `txmempool` (marcofleon)de858ce2bemove-only: make GetInfo a private CTxMemPool member (stickies-v)eee473d9f3Convert `CompareInvMempoolOrder` to GenTxidVariant (marcofleon)243553d590refactor: replace get_iter_from_wtxid with GetIter(const Wtxid&) (stickies-v)fcf92fd640refactor: make CTxMemPool::GetIter strongly typed (marcofleon)11d28f21bbImplement GenTxid as a variant (marcofleon) Pull request description: Part of the [type safety refactor](https://github.com/bitcoin/bitcoin/pull/32189). This PR changes the GenTxid class to a variant, which holds both Txids and Wtxids. This provides compile-time type safety and eliminates the manual type check (bool m_is_wtxid). Variables that can be either a Txid or a Wtxid are now using the new GenTxid variant, instead of uint256. ACKs for top commit: w0xlt: ACKa60f863d3edergoegge: Code review ACKa60f863d3emaflcko: review ACKa60f863d3e🎽 theStack: Code-review ACKa60f863d3eTree-SHA512: da9b73b7bdffee2eb9281a409205519ac330d3336094d17681896703fbca8099608782c9c85801e388e4d90af5af8abf1f34931f57bbbe6e9674d802d6066047
Internal c++ interfaces
The following interfaces are defined here:
-
Chain— used by wallet to access blockchain and mempool state. Added in #14437, #14711, #15288, and #10973. -
ChainClient— used by node to start & stopChainclients. Added in #14437. -
Node— used by GUI to start & stop bitcoin node. Added in #10244. -
Handler— returned byhandleEventmethods on interfaces above and used to manage lifetimes of event handlers. -
Init— used by multiprocess code to access interfaces above on startup. Added in #19160. -
Ipc— used by multiprocess code to accessInitinterface across processes. Added in #19160.
The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in different processes, and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.