Skip to content

Commit

Permalink
fix comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Sep 3, 2024
1 parent 9eb4f4f commit d2919a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codec/consolereader.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ func (ctx *parseCtx) readBlock(line string) (*pbnear.Block, error) {
if block.Header.PrevHash.AsBase58String() != base58.Encode(parentHash) {
return nil, fmt.Errorf("invalid block: prev hash mismatch, got %s, expected %s", block.Header.PrevHash.AsBase58String(), base58.Encode(parentHash))
}
if block.Header.LastFinalBlock.AsBase58String() != hex.EncodeToString(libHash) {
return nil, fmt.Errorf("invalid block: lib hash mismatch, got %s, expected %s", block.Header.LastFinalBlock.AsBase58String(), hex.EncodeToString(libHash))
if block.Header.LastFinalBlock.AsBase58String() != base58.Encode(libHash) {
return nil, fmt.Errorf("invalid block: lib hash mismatch, got %s, expected %s", block.Header.LastFinalBlock.AsBase58String(), base58.Encode(libHash))
}

newParsingStats(blockNum).log()
Expand Down

0 comments on commit d2919a2

Please sign in to comment.