Refactor updateState #2865 (#2929)

* Refactor updateState #2865

* Apply suggestions from code review

Co-Authored-By: danil-lashin <danil-lashin@yandex.ru>

* Apply suggestions from code review
This commit is contained in:
Daniil Lashin
2018-11-28 16:32:16 +03:00
committed by Ethan Buchman
parent ef9902e602
commit 7213869fc6
3 changed files with 41 additions and 32 deletions

View File

@ -218,7 +218,9 @@ func TestUpdateValidators(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
_, err := updateValidators(tc.currentSet, tc.abciUpdates)
updates, err := types.PB2TM.ValidatorUpdates(tc.abciUpdates)
assert.NoError(t, err)
err = updateValidators(tc.currentSet, updates)
if tc.shouldErr {
assert.Error(t, err)
} else {