[GUI][Refactoring] Constrain direct wallet access from the GUI in a single place#2293
Conversation
b24260b to
4f8c86c
Compare
4f8c86c to
bdaa89f
Compare
furszy
left a comment
There was a problem hiding this comment.
Code reviewed up until 3ffd73038f1ce5f339afa2f28057bfb3d871ea94 , left few comments.
Other than that, looking good ☕ . One step closer to the multi-process goal :).
7f71823 to
a6b14f6
Compare
|
Checked c3f6a7db3f092ef7a594f0fb2d5659764ff3b8c2 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
furszy
left a comment
There was a problem hiding this comment.
nice work! ☕☕
Code review ACK 9d7e5451dad14b9bee8e419322bdafeb76fd7be3
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
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.cppto 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.