Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Aug 25, 2020

Improvement over the coinstake transaction creation flow, it will speed up the process a lot.
Removing a for loop redundancy (it was looping over the available outputs twice), removing a simply bad usage of unique_ptr, guarding chainActive access, removing unused zPoS code and few smaller warnings fixes.

random-zebra
random-zebra previously approved these changes Aug 25, 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.

nice cleanup 👍 utACK 4f5329c6a5fa63a77ed3145fa73faf274a6c20f6

@furszy furszy requested a review from Fuzzbawls August 25, 2020 23:07
Fuzzbawls
Fuzzbawls previously approved these changes Sep 6, 2020
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 4f5329c6a5fa63a77ed3145fa73faf274a6c20f6

@random-zebra
Copy link

Needs rebase

@furszy furszy dismissed stale reviews from Fuzzbawls and random-zebra via 9fb497d September 6, 2020 16:19
@furszy furszy force-pushed the 2020_wallet_createCoinStake_cleanup branch from 4f5329c to 9fb497d Compare September 6, 2020 16:19
@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 9fb497d and merging...

@random-zebra random-zebra merged commit 6480c7d into PIVX-Project:master Sep 6, 2020
furszy added a commit that referenced this pull request Sep 8, 2020
261bd22 Staking process: calculate the stakeable utxo only once. (furszy)

Pull request description:

  Work on top of #1816 and part of #1817 coinstake transaction creation speedup goal. Starting on 01814d5

  Improving the following situation: we are calculating the stakeable utxo twice for the same PoS block creation process (looping over the entire wallet's transactions map twice), one before calling `CreateNewBlock` in `CheckForCoins` and the second one inside the `CreateNewBlock` method when we call `CWallet::CreateCoinStake`.
  This PR fixes it adding an unique available coins vector calculated before the block creation, only once per try, in the `CheckForCoins` function and feeding `CreateNewBlock` with it.

ACKs for top commit:
  random-zebra:
    utACK 261bd22

Tree-SHA512: f553667fd48d0d7eb78e2ce87b438c915dc216b32e0426e0214caa52f16a2627143319233c6dd93e4b5d45dcfbb825787c1b39cd209c8e6516bf2391f0516e00
@random-zebra random-zebra modified the milestones: 5.0.0, 4.3.0 Sep 10, 2020
@furszy furszy deleted the 2020_wallet_createCoinStake_cleanup 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