forked from TrueCloudLab/frostfs-node
[#793] adm: Support new FrostFS ID contract
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b62008daca
commit
f871f5cc6c
3 changed files with 95 additions and 3 deletions
|
@ -31,6 +31,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -46,6 +47,8 @@ const (
|
|||
proxyContract = "proxy"
|
||||
)
|
||||
|
||||
const frostfsIDAuthorizedKeysConfigKey = "frostfsid.authorized_keys"
|
||||
|
||||
var (
|
||||
contractList = []string{
|
||||
balanceContract,
|
||||
|
@ -535,9 +538,12 @@ func (c *initializeContext) getContractDeployData(ctrName string, keysParam []an
|
|||
nnsCs.Hash,
|
||||
"container")
|
||||
case frostfsIDContract:
|
||||
items = append(items,
|
||||
c.Contracts[netmapContract].Hash,
|
||||
c.Contracts[containerContract].Hash)
|
||||
hs, err := getFrostfsIDAuthorizedKeys(viper.GetViper())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
items = append(items, hs)
|
||||
case netmapContract:
|
||||
md := getDefaultNetmapContractConfigMap()
|
||||
if method == updateMethodName {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue