forked from TrueCloudLab/frostfs-node
[#726] neofs-adm: remove alphabet contract from contract list
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
9491ff2571
commit
9ef2579afa
1 changed files with 5 additions and 6 deletions
|
@ -32,7 +32,6 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var contractList = []string{
|
var contractList = []string{
|
||||||
alphabetContract,
|
|
||||||
auditContract,
|
auditContract,
|
||||||
balanceContract,
|
balanceContract,
|
||||||
containerContract,
|
containerContract,
|
||||||
|
@ -118,7 +117,11 @@ func (c *initializeContext) deployContracts() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cs := c.Contracts[alphabetContract]
|
cs, err := c.readContract(ctrPath, alphabetContract)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
ctrHash := state.CreateContractHash(acc.Contract.ScriptHash(), cs.NEF.Checksum, cs.Manifest.Name)
|
ctrHash := state.CreateContractHash(acc.Contract.ScriptHash(), cs.NEF.Checksum, cs.Manifest.Name)
|
||||||
if _, err := c.Client.GetContractStateByHash(ctrHash); err == nil {
|
if _, err := c.Client.GetContractStateByHash(ctrHash); err == nil {
|
||||||
c.Command.Printf("Stage 4: alphabet contract #%d is already deployed.\n", i)
|
c.Command.Printf("Stage 4: alphabet contract #%d is already deployed.\n", i)
|
||||||
|
@ -152,10 +155,6 @@ func (c *initializeContext) deployContracts() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, ctrName := range contractList {
|
for _, ctrName := range contractList {
|
||||||
if ctrName == alphabetContract {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
cs := c.Contracts[ctrName]
|
cs := c.Contracts[ctrName]
|
||||||
if _, err := c.Client.GetContractStateByHash(cs.Hash); err == nil {
|
if _, err := c.Client.GetContractStateByHash(cs.Hash); err == nil {
|
||||||
c.Command.Printf("Stage 4: %s contract is already deployed.\n", ctrName)
|
c.Command.Printf("Stage 4: %s contract is already deployed.\n", ctrName)
|
||||||
|
|
Loading…
Reference in a new issue