forked from TrueCloudLab/neoneo-go
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:
parent
31dbc35279
commit
eb1749d190
1 changed files with 0 additions and 4 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue