mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
core: avoid extra call to GetNextBlockValidatorsInternal
It should be sufficient to retrieve next block validators once per updateExtensibleWhitelist call and then reuse this value. `nextVals` copy intentionally omitted since the only change that smartcontract.CreateDefaultMultiSigRedeemScript performs over the `nextVals` list is sorting. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
0f2229d6a5
commit
17de1bf7fe
1 changed files with 1 additions and 1 deletions
|
@ -1833,7 +1833,7 @@ func (bc *Blockchain) updateExtensibleWhitelist(height uint32) error {
|
|||
return err
|
||||
}
|
||||
newList = append(newList, hash.Hash160(script))
|
||||
bc.updateExtensibleList(&newList, bc.contracts.NEO.GetNextBlockValidatorsInternal(bc.dao))
|
||||
bc.updateExtensibleList(&newList, nextVals)
|
||||
|
||||
if len(stateVals) > 0 {
|
||||
h, err := bc.contracts.Designate.GetLastDesignatedHash(bc.dao, noderoles.StateValidator)
|
||||
|
|
Loading…
Reference in a new issue