js-tendermint
js-tendermint copied to clipboard
getBlockHash(header) not working
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