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

getBlockHash(header) not working #42

Open
garvitgoel opened this issue Nov 2, 2021 · 0 comments
Open

getBlockHash(header) not working #42

garvitgoel opened this issue Nov 2, 2021 · 0 comments

Comments

@garvitgoel
Copy link

the hash returned by getBlockHash(header) is in-correct. It does not match the match the commit.block_id.hash. This is happening for headers and commits that are correct (checked using go-tendermint).

function verifyCommit (header, commit, validators) {
  let blockHash = getBlockHash(header)

  if (blockHash !== commit.block_id.hash) {
    throw Error('Commit does not match block hash')
  }

Given here - https://github.com/nomic-io/js-tendermint/blob/92aec26734c02b2ccd75ececccdaf1d6e70b772e/src/verify.js#L51

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

No branches or pull requests

1 participant