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

Restore legacy minter info #2453

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Restore legacy minter info #2453

merged 1 commit into from
Sep 18, 2023

Conversation

Bushstar
Copy link
Member

@Bushstar Bushstar commented Sep 15, 2023

Restores the behaviour found in release 3.8.5 and before when printing out minter information for blocks. The previous behaviour can be found in the link below. This prevents masternode being printed in the genesis block, also regardless of a valid MN ID both mintedBlocks and stakeModifier should be added as these are based on the on block index.

auto id = pcustomcsview->GetMasternodeIdByOperator(minter);

@prasannavl prasannavl merged commit 595468e into master Sep 18, 2023
@prasannavl prasannavl deleted the bush/legacy-minter branch September 18, 2023 03:35
@@ -125,35 +125,42 @@ struct MinterInfo {
std::string OperatorAddress{};
std::string RewardAddress{};
uint64_t MintedBlocks{};
uint256 StakeModifier{};
std::string StakeModifier{};
Copy link
Member

Choose a reason for hiding this comment

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

Sure we don't need the StakeModifier in it's raw form here for other use cases?

Note: MinterInfo should be the source for everything where this stakeModifier is used, eventually. We shouldn't be having loose ad-hoc types all over the place. Please make sure that the common denominator is used here, and converted when it's used, rather than directly storing the converted types that's only needed on outer use cases like printing.

Copy link
Member

Choose a reason for hiding this comment

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

Note: Merging, but marking for retrospective check to ensure the base types can absorb the most flexible use cases for future refactors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants