From d15f0f8df0d81d9e646a5ad7b0ee35dfff7d9341 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Fri, 5 Jul 2019 20:44:00 -0700 Subject: [PATCH] Fix some CI bot nits --- lite/provider.go | 2 +- types/block.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lite/provider.go b/lite/provider.go index 3574c52d..ab94cdc7 100644 --- a/lite/provider.go +++ b/lite/provider.go @@ -111,7 +111,7 @@ func (cp concurrentProvider) joinConcurrency(chainID string, height int64) (uniq } } -func (cp concurrentProvider) UpdateToHeight(chainID string, height int64) error { +func (cp *concurrentProvider) UpdateToHeight(chainID string, height int64) error { // Performs synchronization for multi-threads verification at the same height. var presult *pendingResult diff --git a/types/block.go b/types/block.go index b620191e..8a8989ab 100644 --- a/types/block.go +++ b/types/block.go @@ -412,7 +412,7 @@ func (h *Header) Equal(h2 *Header) bool { panic("incomplete heaeders cannot be compared") } h2Hash := h2.Hash() - return bytes.Compare(h1Hash, h2Hash) == 0 + return bytes.Equal(h1Hash, h2Hash) } // Hash returns the hash of the header. @@ -708,7 +708,7 @@ func (commit *Commit) Equal(commit2 *Commit) bool { panic("incomplete commit cannot be compared") } c2Hash := commit2.Hash() - return bytes.Compare(c1Hash, c2Hash) == 0 + return bytes.Equal(c1Hash, c2Hash) } // Hash returns the hash of the commit