From 24cd2eba8eba32d8abcdec2faf13d6fda70d9f40 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Sun, 7 Jul 2019 21:47:39 -0700 Subject: [PATCH] Fixup tests --- lite/base_verifier_test.go | 4 ++-- lite/provider_test.go | 4 ++-- types/validator_set.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lite/base_verifier_test.go b/lite/base_verifier_test.go index 0178c411..f0421eb7 100644 --- a/lite/base_verifier_test.go +++ b/lite/base_verifier_test.go @@ -12,7 +12,7 @@ import ( func TestBaseVerifier(t *testing.T) { assert := assert.New(t) - keys := genPrivKeys(4) + keys := GenPrivKeys(4) // 20, 30, 40, 50 - the first 3 don't have 2/3, the last 3 do! vals := keys.ToValidators(20, 10) // and a Verifier based on our known set @@ -20,7 +20,7 @@ func TestBaseVerifier(t *testing.T) { cert := NewBaseVerifier(chainID, 2, vals) cases := []struct { - keys privKeys + keys PrivKeys vals *types.ValidatorSet height int64 first, last int // who actually signs diff --git a/lite/provider_test.go b/lite/provider_test.go index 94b467de..56c3968d 100644 --- a/lite/provider_test.go +++ b/lite/provider_test.go @@ -48,7 +48,7 @@ func TestMultiProvider(t *testing.T) { func checkProvider(t *testing.T, p PersistentProvider, chainID, app string) { assert, require := assert.New(t), require.New(t) appHash := []byte(app) - keys := genPrivKeys(5) + keys := GenPrivKeys(5) count := 10 // Make a bunch of full commits. @@ -113,7 +113,7 @@ func TestMultiLatestFullCommit(t *testing.T) { chainID := "cache-best-height" appHash := []byte("01234567") - keys := genPrivKeys(5) + keys := GenPrivKeys(5) count := 10 // Set a bunch of full commits. diff --git a/types/validator_set.go b/types/validator_set.go index 12f849a6..bf9a880d 100644 --- a/types/validator_set.go +++ b/types/validator_set.go @@ -639,8 +639,8 @@ func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID, height i } //----------------- -// ErrTooMuchChange +// IsErrTooMuchChange func IsErrTooMuchChange(err error) bool { switch err_ := err.(type) { case cmn.Error: