From dfb26f9ab2077a09341ed41fe4cd5ba66d56cf23 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 5 Jun 2020 15:24:23 +0300 Subject: [PATCH] block: don't attempt verification if there was a decoding error --- pkg/core/block/block.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/core/block/block.go b/pkg/core/block/block.go index cee27d060..54d88fa31 100644 --- a/pkg/core/block/block.go +++ b/pkg/core/block/block.go @@ -160,6 +160,9 @@ func (b *Block) DecodeBinary(br *io.BinReader) { txes[i] = tx } b.Transactions = txes + if br.Err != nil { + return + } br.Err = b.Verify() }