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

[Bug] Fix min depth requirement for stake inputs in AvailableCoins #1458

Merged

Conversation

random-zebra
Copy link

If nDepth is equal to nStakeMinDepth - 1 then the coin is not skipped in AvailableCoins and gets included in the list of stakeable utxos.
This utxo won't be able to stake though, as it will fail ContextCheck in Stake() (logging an error), thus it shouldn't have been included in the first place.

@random-zebra random-zebra added Bug Block Generation Mining/Staking related issues labels Mar 24, 2020
@random-zebra random-zebra added this to the 4.1.0 milestone Mar 24, 2020
@random-zebra random-zebra self-assigned this Mar 24, 2020
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

ACK f2d31e5 .

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 f2d31e5

@random-zebra random-zebra merged commit 8d8050f into PIVX-Project:master Mar 25, 2020
akshaynexus pushed a commit to ZENZO-Ecosystem/ZENZO-Core that referenced this pull request Mar 30, 2020
…puts in AvailableCoins

f2d31e5 [Bug] Fix min depth requirement for stake inputs in AvailableCoins (random-zebra)

Pull request description:

  If `nDepth` is equal to `nStakeMinDepth - 1` then the coin is not skipped in `AvailableCoins` and gets included in the list of stakeable utxos.
  This utxo won't be able to stake though, as it will fail `ContextCheck` in `Stake()` (logging an error), thus it shouldn't have been included in the first place.

ACKs for top commit:
  furszy:
    ACK f2d31e5 .
  Fuzzbawls:
    ACK f2d31e5

Tree-SHA512: 1b75a555e9ad4d2526fdc49e9059baaed1c383b6abc121f9cd85c48f44f82b21e13e8ee66f6d535c078f226360f93fd12ebf1889124acb74c0e7fcc17464dad7
@random-zebra random-zebra deleted the 202003_stakeablecoins_depth_fix branch September 24, 2020 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Block Generation Mining/Staking related issues Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants