privval: return error on getpubkey (#4534)

closes #3602

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
This commit is contained in:
Marko
2020-03-12 08:10:36 +01:00
committed by GitHub
parent 038aff1fdb
commit 48f073d796
30 changed files with 501 additions and 216 deletions

View File

@@ -171,8 +171,12 @@ func TestValidateBlockCommit(t *testing.T) {
time.Now(),
)
require.NoError(t, err, "height %d", height)
bpvPubKey, err := badPrivVal.GetPubKey()
require.NoError(t, err)
badVote := &types.Vote{
ValidatorAddress: badPrivVal.GetPubKey().Address(),
ValidatorAddress: bpvPubKey.Address(),
ValidatorIndex: 0,
Height: height,
Round: 0,