mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
core: drop oracles from extensible whitelist
This commit is contained in:
parent
a4b54b2e8a
commit
fbf7d9edce
1 changed files with 1 additions and 14 deletions
|
@ -795,16 +795,12 @@ func (bc *Blockchain) storeBlock(block *block.Block, txpool *mempool.Pool) error
|
|||
|
||||
func (bc *Blockchain) updateExtensibleWhitelist(height uint32) error {
|
||||
updateCommittee := native.ShouldUpdateCommittee(height, bc)
|
||||
oracles, oh, err := bc.contracts.Designate.GetDesignatedByRole(bc.dao, noderoles.Oracle, height)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
stateVals, sh, err := bc.contracts.Designate.GetDesignatedByRole(bc.dao, noderoles.StateValidator, height)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if bc.extensible.Load() != nil && !updateCommittee && oh != height && sh != height {
|
||||
if bc.extensible.Load() != nil && !updateCommittee && sh != height {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -817,15 +813,6 @@ func (bc *Blockchain) updateExtensibleWhitelist(height uint32) error {
|
|||
newList = append(newList, hash.Hash160(script))
|
||||
bc.updateExtensibleList(&newList, bc.contracts.NEO.GetNextBlockValidatorsInternal())
|
||||
|
||||
if len(oracles) > 0 {
|
||||
h, err := bc.contracts.Designate.GetLastDesignatedHash(bc.dao, noderoles.Oracle)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newList = append(newList, h)
|
||||
bc.updateExtensibleList(&newList, oracles)
|
||||
}
|
||||
|
||||
if len(stateVals) > 0 {
|
||||
h, err := bc.contracts.Designate.GetLastDesignatedHash(bc.dao, noderoles.StateValidator)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue