From 2a1253e45a5fc3cbd06327a33c4fa3b7550d8bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 28 Feb 2020 18:21:22 +0100 Subject: [PATCH] types: Simplify Ticket.Equals --- chain/types/blockheader.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/chain/types/blockheader.go b/chain/types/blockheader.go index 2494a9bf5..7d579a261 100644 --- a/chain/types/blockheader.go +++ b/chain/types/blockheader.go @@ -9,7 +9,6 @@ import ( block "github.com/ipfs/go-block-format" "github.com/ipfs/go-cid" - "github.com/minio/blake2b-simd" "github.com/minio/sha256-simd" "github.com/multiformats/go-multihash" xerrors "golang.org/x/xerrors" @@ -215,7 +214,5 @@ func ElectionPostChallengeCount(sectors uint64, faults uint64) uint64 { } func (t *Ticket) Equals(ot *Ticket) bool { - tDigest := blake2b.Sum256(t.VRFProof) - otDigest := blake2b.Sum256(ot.VRFProof) - return bytes.Equal(tDigest[:], otDigest[:]) + return bytes.Equal(t.VRFProof, ot.VRFProof) }