8000 [Wallet] Minor CreateCoinStake Cleanup by lyricidal · Pull Request #244 · PRCYCoin/PRCYCoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Wallet] Minor CreateCoinStake Cleanup #244

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

Merged
merged 2 commits into from
Aug 11, 2022
Merged

[Wallet] Minor CreateCoinStake Cleanup #244

merged 2 commits into from
Aug 11, 2022

Conversation

lyricidal
Copy link
  • GetPubKey() can be an expensive check and is not necessary to be recalled every staking loop in the context that it is used - move it outside of the loop and use it as a variable.
  • We were initializing another CBlockIndex when we could just use chainActive.Height() instead

@lyricidal lyricidal merged commit abe9f05 into develop Aug 11, 2022
@lyricidal lyricidal deleted the expensive-check branch August 11, 2022 19:50
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
0