mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-24 14:22:16 +00:00
Fix TestBeginBlockValidators
This commit is contained in:
parent
2a1d0542f3
commit
5d3961d705
@ -64,7 +64,7 @@ func TestBeginBlockValidators(t *testing.T) {
|
||||
|
||||
now := tmtime.Now()
|
||||
commitSig0 := (&types.Vote{ValidatorIndex: 0, Timestamp: now, Type: types.PrecommitType}).CommitSig()
|
||||
commitSig1 := (&types.Vote{ValidatorIndex: 1, Timestamp: now}).CommitSig()
|
||||
commitSig1 := (&types.Vote{ValidatorIndex: 1, Timestamp: now, Type: types.PrecommitType}).CommitSig()
|
||||
|
||||
testCases := []struct {
|
||||
desc string
|
||||
@ -97,7 +97,7 @@ func TestBeginBlockValidators(t *testing.T) {
|
||||
} else {
|
||||
assert.True(t, v.SignedLastBlock)
|
||||
assert.NotNil(t, v.FullVote)
|
||||
assert.Equal(t, *v.FullVote, types.Vote(*tc.lastCommitPrecommits[i]))
|
||||
assert.Equal(t, v.FullVote, types.TM2PB.Vote(tc.lastCommitPrecommits[i]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -222,6 +222,10 @@ func (pb2tm) ValidatorUpdates(vals []abci.ValidatorUpdate) ([]*Validator, error)
|
||||
}
|
||||
|
||||
func (tm2pb) Vote(vote *CommitSig) *abci.Vote {
|
||||
if vote == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
blockID := TM2PB.BlockID(vote.BlockID)
|
||||
|
||||
return &abci.Vote{
|
||||
|
Loading…
x
Reference in New Issue
Block a user