Skip to content
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

[Wallet] Address book encapsulation. #1819

Merged

Conversation

furszy
Copy link

@furszy furszy commented Aug 27, 2020

Essentially, have restricted mapAddressbook access to the wallet class only. Migrating every direct access to the correspondent getter, setter and iterator wrapper. Plus, solved a todo in AddressTableModel::getAddressToShow (df262e4).
It's a preparation for the shielded addresses addressbook support.

@furszy furszy self-assigned this Aug 27, 2020
random-zebra
random-zebra previously approved these changes Aug 30, 2020
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty nice. utACK f97ed1c

@random-zebra
Copy link

Needs rebase

@furszy
Copy link
Author

furszy commented Sep 6, 2020

rebased

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK 264d331

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a bug with the addressbook iterator-based while loops.

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch from 264d331 to 17b57b9 Compare September 7, 2020 21:05
@furszy
Copy link
Author

furszy commented Sep 7, 2020

updated following the feedback 👌

@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch 3 times, most recently from c659294 to 735c169 Compare September 9, 2020 19:54
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for multiple reviews... but have found something else, about the recursive locking being introduced here. See inline comments (there could be other instances too).

src/qt/addresstablemodel.cpp Outdated Show resolved Hide resolved
src/qt/walletmodel.cpp Outdated Show resolved Hide resolved
src/qt/walletmodel.cpp Show resolved Hide resolved
src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch from 735c169 to 8b5eaf7 Compare September 9, 2020 22:06
@furszy
Copy link
Author

furszy commented Sep 9, 2020

updated solving all of the comments 👍

@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch from 8b5eaf7 to 01bf9ff Compare September 11, 2020 23:19
@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch from 01bf9ff to 6fb8f1f Compare September 12, 2020 03:12
@furszy furszy force-pushed the 2020_wallet_encapsulate_mapAddressBook branch from 6fb8f1f to e0ffc98 Compare September 18, 2020 04:57
@furszy
Copy link
Author

furszy commented Sep 18, 2020

rebased on master due conflicts with recently merged #1853 plus cleaned a previous refactor that wasn't needed anymore in ListaddressesForPurpose pointed by zebra.

Ready for review.

@furszy furszy requested review from random-zebra and removed request for random-zebra September 19, 2020 16:40
random-zebra
random-zebra previously approved these changes Sep 21, 2020
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
There is still some recursive locking (e.g. HasAddressBook or GetNameForAddressBookEntry), but those can be fixed later.
Same as a couple comments left inline.
ACK e0ffc98

src/wallet/rpcwallet.cpp Outdated Show resolved Hide resolved
src/wallet/wallet.h Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Sep 21, 2020

Done, updated the two lines changes. A quick git diff and can be re acked.

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK f7e997f

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f7e997f

@Fuzzbawls Fuzzbawls changed the title [wallet] Address book encapsulation. [Wallet] Address book encapsulation. Sep 22, 2020
@furszy furszy merged commit b656247 into PIVX-Project:master Sep 22, 2020
@furszy furszy deleted the 2020_wallet_encapsulate_mapAddressBook branch November 29, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants