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

multi: Show PowHash on blocks view page for DCP0011 #1970

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

ukane-philemon
Copy link
Collaborator

Closes #1965.

Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
Comment on lines +5840 to +5844
header, err := pgb.Client.GetBlockHeader(pgb.ctx, blockChainHash)
if err != nil {
log.Errorf("failed to fetch header for block hash %s: %v", data.Hash, err)
return nil
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This looks a bit expensive?

Copy link
Member

@chappjc chappjc Jul 18, 2023

Choose a reason for hiding this comment

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

Ideally PowHash would be added to chainjson.GetBlockVerboseResult (a dcrd change). We get this just above, at the start of this method. AFAIK, we can only get this at present by hashing the block header.

Copy link
Member

Choose a reason for hiding this comment

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

Would require: decred/dcrd#3154

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Verified working. Will follow up if decred/dcrd#3154 becomes available so we can skip the request for the raw header.

@chappjc chappjc merged commit 25944c8 into decred:master Jul 18, 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.

Feature Request: Show Separate Proof-of-Work Hash
2 participants