-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GUI][Refactoring] Constrain direct wallet access from the GUI in a single place #2293
[GUI][Refactoring] Constrain direct wallet access from the GUI in a single place #2293
Conversation
b24260b
to
4f8c86c
Compare
4f8c86c
to
bdaa89f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reviewed up until 3ffd730 , left few comments.
Other than that, looking good ☕ . One step closer to the multi-process goal :).
7f71823
to
a6b14f6
Compare
Checked c3f6a7d and is looking quite good ☕ . Have made some changes to it so we can get rid off the friend class declaration furszy@71bec54. Better to not allow private/protected members access/modifications from outside of the object and get a bit better class responsibilities division :). |
a6b14f6
to
9d7e545
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! ☕☕
Code review ACK 9d7e545
Will try it a bit now.
Needs rebase |
`getBalances` is meant to be used only for the internal polling update process. Now that `processBalanceChangeInternal` has been encapsulated, there is no more need to expose `getBalances`. The rest of the GUI should be using `GetWalletBalances`, which returns cached data.
- encapsulate SST settings, and save only in wallet DB - emit signal when SST changes (to sync GUI with RPC)
multisend is disabled since long ago, and it won't be re-entroduced in its current form. Remove all related dead code, including the GUI widgets, which have also lots of direct accesses to pwalletMain.
9d7e545
to
012de60
Compare
Rebased. |
… inside SaplingOperation b1e1f4e [Trivial] Initialize wallet pointers to nullptr (random-zebra) c4853b1 [Refactoring] Remove all pwalletMain direct access in sapling_operation (random-zebra) 80054f7 [Refactoring] Initialize txbuilder inside sapling_operation (random-zebra) 74a1592 [Cleanup] Remove un-used setTxBuilder in sapling_operation (random-zebra) Pull request description: This complements PIVX-Project#2293, trying to achieve the same goal on the sapling code (remove all rogue accesses to `pwalletMain`). Save a pointer to a wallet inside `SaplingOperation`, initialized in the constructor, and passed directly to the `TransactionBuilder` (which needs a keystore to produce signatures for the transparent inputs). ACKs for top commit: furszy: ACK b1e1f4e Fuzzbawls: ACK b1e1f4e Tree-SHA512: 96de28f3b97edee34171c815c5d9f74c826caed025b60dadd6f5ec66ee020f912f61d99d707e95573d5537c2d0151078d8bd06cffff45753b754d927bf8c9fdb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK 012de60 after rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 012de60
First step for the multiwallet implementation.
We have several places in the GUI code, where we freely access
pwalletMain
.Such global should be used exclusively in
pivx-qt.cpp
to initialize the internal pointer ofWalletModel
. All other calls to the wallet from the GUI should pass through the model.Bonus: In the process, kill multisend with fire.