Merge pull request #1660 from nspcc-dev/initialize-role-management-before-oracles

native: swap oracle and role management init
This commit is contained in:
Roman Khimov 2021-01-13 13:03:27 +03:00 committed by GitHub
commit f912ee60df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -73,18 +73,18 @@ func NewContracts(p2pSigExtensionsEnabled bool) *Contracts {
cs.Policy = policy cs.Policy = policy
cs.Contracts = append(cs.Contracts, policy) cs.Contracts = append(cs.Contracts, policy)
oracle := newOracle()
oracle.GAS = gas
oracle.NEO = neo
cs.Oracle = oracle
cs.Contracts = append(cs.Contracts, oracle)
desig := newDesignate(p2pSigExtensionsEnabled) desig := newDesignate(p2pSigExtensionsEnabled)
desig.NEO = neo desig.NEO = neo
cs.Designate = desig cs.Designate = desig
cs.Oracle.Desig = desig
cs.Contracts = append(cs.Contracts, desig) cs.Contracts = append(cs.Contracts, desig)
oracle := newOracle()
oracle.GAS = gas
oracle.NEO = neo
oracle.Desig = desig
cs.Oracle = oracle
cs.Contracts = append(cs.Contracts, oracle)
if p2pSigExtensionsEnabled { if p2pSigExtensionsEnabled {
notary := newNotary() notary := newNotary()
notary.GAS = gas notary.GAS = gas

View file

@ -40,7 +40,7 @@ type oraclesData struct {
} }
const ( const (
designateContractID = -5 designateContractID = -4
// maxNodeCount is the maximum number of nodes to set the role for. // maxNodeCount is the maximum number of nodes to set the role for.
maxNodeCount = 32 maxNodeCount = 32

View file

@ -38,7 +38,7 @@ type Oracle struct {
} }
const ( const (
oracleContractID = -4 oracleContractID = -5
maxURLLength = 256 maxURLLength = 256
maxFilterLength = 128 maxFilterLength = 128
maxCallbackLength = 32 maxCallbackLength = 32