Repository navigation
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. External sites
ReviewsSee the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. LLM Linter (✨ experimental)Possible typos and grammar issues:
Possible places where named args for integral literals may be used (e.g.
2026-11-24 20:08:38 |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
94cfe01 to
45d2803
Compare
|
Concept ACK. multi_index seems like the right thing to use here. Since this doesn't leak into consensus/node, I don't see the harm in spreading the dependency to wallet. Getting rid of multi_index for the kernel will require something that essentially re-implements its functionality, and I don't see anything new here that would complicate that implementation. Note that I'm biased: I'm currently working on such a re-implementation that I hope to propose for v33. I do have a few requests to make my life easier though. Firstly, please specify an index for each operation, as opposed to just using For ex, rather than To simplify that, in WalletTxs m_txs;
WalletTxs::index<index_by_txid>& m_txs_by_txid;
WalletTxs::index<index_by_pos>& m_txs_by_pos;And in the constructor: m_txs_by_txid(m_txs.get<index_by_txid>());
m_txs_by_pos(m_txs.get<m_txs_by_pos>());Then everywhere you would use Here's an example of the mempool conversion to work that way (though I used indices rather than tags, which is uglier): theuni@b58ab92 . Secondly, please use |
Hmm, |
45d2803 to
1d8337a
Compare
1d8337a to
e57b085
Compare
|
I've changed all of the |
e57b085 to
c56a38e
Compare
c34334e to
f31dfae
Compare
f31dfae to
7146e2f
Compare
When a transaction needs to be added to the wallet for testing, we can use AddToWallet instead of direct insertion into mapWallet.
Since all of the things that MarkDirty changes are mutable, we can mark it as a const so it can be called on const CWalletTx objects.
Since we need to access transactions both by txid and insertion order, instead of having 2 separate maps, the second with raw pointers into first, we can use a multi index.
7146e2f to
a5c05e1
Compare
|
Looks like the CI unit tests failed, but it is impossible for me to see the actual error in the 5 trillion lines of logs |
It’s actually 6 trillion, your download was truncated :p My clanker claims the job failed because |
|
🐙 This pull request conflicts with the target branch and needs rebase. |

The wallet needs to access transactions both by txid, and by insertion order into the wallet.
mapWalletwas the main container for the wallet transactions, and it was keyed by txid.wtxOrderedwas a secondary container which was keyed by order, and held pointers to theCWalletTxobjects stored inmapWallet. These are replaced by a new boost multi index which indexes on txid and insertion order, allowing us to get rid of the 2 separate containers, and holding raw pointers toCWalletTx.