Skip to content

Conversation

@codablock
Copy link

@codablock codablock commented Aug 10, 2018

This PR also includes the commits of #2212. I'll rebase and force-push after that one is merged. Only the last 2 commits are actually part of this PR.

These commits are extracted from #2083 and slightly modified to work with the current develop branch. The original commit also enabled payment of MN rewards and superblock payments in the same block. The logic is still included in this modified commit, but hardcoded to always be disabled. When rebasing #2212, this logic will be enabled depending on spork15 (as in the original commit).

Copy link

@UdjinM6 UdjinM6 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, just one small code-style issue

Copy link

Choose a reason for hiding this comment

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

These changes leaked from a27c49699cc2614e9d19c09a044171caa383e815 I guess but it's ok, will be swashed on merge anyway :)

Copy link

Choose a reason for hiding this comment

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

@UdjinM6 UdjinM6 added this to the 12.4 milestone Aug 10, 2018
1. Move out old budget validation into it's own function (IsOldBudgetBlockValueValid)
2. Refactor IsBlockValueValid to bail out early instead of using deep
   nested if/else blocks. IMHO, I feel that this makes the code much easier
   to read and less error prone.
3. Refactor/rename CreateSuperblock and CMasternodePayments::FillBlockPayee
   to be getters without actually modifying the coinbase TX. The coinbase
   is now only modified from the global FillBlockPayments function. Makes
   later changes in DIP3 easier (allowing superblock and MN rewards in same block)
@codablock codablock force-pushed the pr_refactorpayeelogic branch from 4f8ec1c to 2773891 Compare August 11, 2018 20:50
@codablock
Copy link
Author

Rebased on develop after #2212 was merged.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@UdjinM6 UdjinM6 merged commit 4d3518f into dashpay:develop Aug 12, 2018
@codablock codablock deleted the pr_refactorpayeelogic branch September 14, 2018 12:51
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