Skip to content

Commit

Permalink
fix for get-block-info
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmannjan committed Dec 17, 2021
1 parent 3476324 commit eb92e0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/CasperServiceByJsonRPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ export class CasperServiceByJsonRPC {
}
})
.then((res: GetBlockResult) => {
if (res.block !== null && res.block.hash !== blockHashBase16) {
if (
res.block !== null &&
res.block.hash.toLowerCase() !== blockHashBase16.toLowerCase()
) {
throw new Error('Returned block does not have a matching hash.');
}
return res;
Expand Down

0 comments on commit eb92e0b

Please sign in to comment.