core: remove persisting from GetValidators()

It's a getter function and even though it's quite fancy with its transactions
processing (for consensus operation) it shouldn't ever change the state of the
Blockchain. If we're to change anything here these changes may conflict with
the actual block processing later or may lead to broken state (if transactions
won't be approved for some reason).
This commit is contained in:
Roman Khimov 2019-12-12 21:14:33 +03:00
parent 31dbc35279
commit eb1749d190

View file

@ -1249,10 +1249,6 @@ func (bc *Blockchain) GetValidators(txes ...*transaction.Transaction) ([]*keys.P
for i := 0; i < uniqueSBValidators.Len() && result.Len() < count; i++ { for i := 0; i < uniqueSBValidators.Len() && result.Len() < count; i++ {
result = append(result, uniqueSBValidators[i]) result = append(result, uniqueSBValidators[i])
} }
_, err = cache.store.Persist()
if err != nil {
return nil, err
}
return result, nil return result, nil
} }