diff --git a/codec/consolereader.go b/codec/consolereader.go index 0b7d9fc..9e49ffe 100644 --- a/codec/consolereader.go +++ b/codec/consolereader.go @@ -212,10 +212,10 @@ func (ctx *parseCtx) readBlock(line string) (*pbnear.Block, error) { if block.Header.PrevHeight != parentHeight { return nil, fmt.Errorf("invalid block: prev height mismatch, got %d, expected %d", block.Header.PrevHeight, parentHeight) } - if block.Header.PrevHash.AsString() != base58.Encode(parentHash) { + 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.AsString() != hex.EncodeToString(libHash) { + 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)) }