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

[GUI] Decouple legacy MNs code from the GUI elements #2721

Merged

Conversation

furszy
Copy link

@furszy furszy commented Jan 14, 2022

Encapsulating the legacy Masternodes code that is spread over the GUI widgets inside the MN module.

Plus, as is a value shared between legacy and deterministic Masternodes, moved the collateral min conf field to chainparams. Which allowed to remove the following circular dependency: "evo/deterministicmns -> masternode -> wallet/wallet -> evo/deterministicmns"

Part of the building blocks for adding visual support for the new deterministic Masternodes features.

@furszy furszy self-assigned this Jan 14, 2022
@furszy furszy changed the title [GUI] Decouple legacy MNs code from the GUI elements [WIP][GUI] Decouple legacy MNs code from the GUI elements Jan 14, 2022
@furszy furszy added the GUI label Jan 14, 2022
@furszy furszy changed the title [WIP][GUI] Decouple legacy MNs code from the GUI elements [GUI] Decouple legacy MNs code from the GUI elements Jan 17, 2022
@furszy
Copy link
Author

furszy commented Jan 17, 2022

Ended up moving the collateral min conf value to chainparams here (to not have to create another small PR for it and rebase all the other branches on top of it).
This is one of the few shared values between legacy and deterministic Masternodes. Which not only allowed me to finish this encapsulation work, it removed the following circular dependency as well: "evo/deterministicmns -> masternode -> wallet/wallet -> evo/deterministicmns"

random-zebra
random-zebra previously approved these changes Jan 18, 2022
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.

ACK e364c34. Just few nits

src/qt/pivx/mnmodel.cpp Outdated Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/qt/pivx/mnmodel.cpp Show resolved Hide resolved
src/qt/pivx/masternodewizarddialog.cpp Outdated Show resolved Hide resolved
src/chainparams.cpp Outdated Show resolved Hide resolved
@furszy
Copy link
Author

furszy commented Jan 18, 2022

updated per feedback, nits tackled

random-zebra
random-zebra previously approved these changes Jan 18, 2022
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.

force-push utACK c42547e

Fuzzbawls
Fuzzbawls previously approved these changes Jan 29, 2022
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.

ACK c42547e

@furszy
Copy link
Author

furszy commented Jan 29, 2022

rebased, conflicts solved.

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 little bug.

src/qt/pivx/masternodeswidget.cpp Outdated Show resolved Hide resolved
@furszy furszy force-pushed the 2022_GUI_encapsulate_legacy_mn branch from 42b6a73 to 18e270d Compare January 29, 2022 16:17
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.

ACK 18e270d

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.

re-ACK 18e270d

@random-zebra random-zebra merged commit bedf4de into PIVX-Project:master Jan 31, 2022
furszy added a commit that referenced this pull request Feb 8, 2022
…fix and more circ dependencies fixes

4e14d21 bug: remove 'evodb' dir during -resync (furszy)
7408131 init: move 'pEvoNotificationInterface' initialization, reset and register to tiertwo/init.cpp (furszy)
922fa05 wallet: merge GetMasternodeVinAndKeys and GetVinAndKeysFromOutput functions. (furszy)
083fcad Move masternodeconfig initialization to tiertwo/init (furszy)

Pull request description:

  Built on top of #2721, decoupled from the DMN GUI branch.

  Focused on the following points:

  * Unify `masternodeconfig` duplicated initialization inside `tiertwo/init.cpp`. Same for the `pEvoNotificationInterface` class.
  * Simplify and unify `CWallet::GetMasternodeVinAndKeys` and `CWallet::GetVinAndKeysFromOutput` functions.
  * Bug fix: remove 'evodb' dir during `-resync`.
  * Fix the following circular dependencies:
     --> "masternode -> wallet/wallet -> masternode"
     --> "chain -> legacy/stakemodifier -> stakeinput -> wallet/wallet -> evo/deterministicmns -> chain"

  Next PR will be exclusively focused on the new tier two module.

ACKs for top commit:
  random-zebra:
    force-push utACK 4e14d21

Tree-SHA512: 1c74975acb926f2410f651fc95c5dc437aa1b272ad4e0b27c50087d96908d183d85dd5b9c11528482d25d3062a1efc80bdf0567098724157912bb2a68566a5cc
@Fuzzbawls Fuzzbawls modified the milestones: 6.0.0, 5.5.0 Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants