forked from TrueCloudLab/frostfs-node
[#15] Add netmap contract and node info configs
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
c299de5de9
commit
73b8ed4203
1 changed files with 31 additions and 0 deletions
|
@ -28,7 +28,11 @@ type cfg struct {
|
||||||
|
|
||||||
cfgContainer cfgContainer
|
cfgContainer cfgContainer
|
||||||
|
|
||||||
|
cfgNetmap cfgNetmap
|
||||||
|
|
||||||
privateTokenStore *tokenStorage.TokenStore
|
privateTokenStore *tokenStorage.TokenStore
|
||||||
|
|
||||||
|
cfgNodeInfo cfgNodeInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
type cfgGRPC struct {
|
type cfgGRPC struct {
|
||||||
|
@ -57,6 +61,26 @@ type cfgContainer struct {
|
||||||
fee util.Fixed8
|
fee util.Fixed8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type cfgNetmap struct {
|
||||||
|
scriptHash string
|
||||||
|
|
||||||
|
fee util.Fixed8
|
||||||
|
}
|
||||||
|
|
||||||
|
type BootstrapType uint32
|
||||||
|
|
||||||
|
type cfgNodeInfo struct {
|
||||||
|
bootType BootstrapType
|
||||||
|
|
||||||
|
address string
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
_ BootstrapType = iota
|
||||||
|
StorageNode
|
||||||
|
RelayNode
|
||||||
|
)
|
||||||
|
|
||||||
func defaultCfg() *cfg {
|
func defaultCfg() *cfg {
|
||||||
key, err := crypto.LoadPrivateKey("Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1oKoA9waeAze97s")
|
key, err := crypto.LoadPrivateKey("Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1oKoA9waeAze97s")
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
|
@ -79,5 +103,12 @@ func defaultCfg() *cfg {
|
||||||
scriptHash: "9d2ca84d7fb88213c4baced5a6ed4dc402309039",
|
scriptHash: "9d2ca84d7fb88213c4baced5a6ed4dc402309039",
|
||||||
fee: util.Fixed8(1),
|
fee: util.Fixed8(1),
|
||||||
},
|
},
|
||||||
|
cfgNetmap: cfgNetmap{
|
||||||
|
scriptHash: "75194459637323ea8837d2afe8225ec74a5658c3",
|
||||||
|
fee: util.Fixed8(1),
|
||||||
|
},
|
||||||
|
cfgNodeInfo: cfgNodeInfo{
|
||||||
|
bootType: StorageNode,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue