mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-24 09:25:21 +00:00
Merge pull request #1660 from nspcc-dev/initialize-role-management-before-oracles
native: swap oracle and role management init
This commit is contained in:
commit
f912ee60df
3 changed files with 9 additions and 9 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue