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

. #27855

Closed
wants to merge 1 commit into from
Closed

. #27855

wants to merge 1 commit into from

Conversation

crparse
Copy link

@crparse crparse commented Jun 11, 2023

No description provided.

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@fanquake fanquake closed this Jun 11, 2023
@crparse
Copy link
Author

crparse commented Jun 11, 2023

The MakeBlockInfoRecursive function is introduced, which serves as the entry point for creating the BlockInfo object recursively.

A helper function, GetPreviousHash, is defined to recursively obtain the previous hash. It takes a CBlockIndex pointer as a parameter and returns a const uint256*.

Inside MakeBlockInfoRecursive, the GetPreviousHash function is called to obtain the previous hash instead of using a ternary operator directly. The GetPreviousHash function handles the recursion to obtain the previous hash until reaching a null pointer.

The locking mechanism remains the same as in the previous versions.

@fanquake fanquake changed the title Master . Jun 15, 2023
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.

None yet

3 participants