[#15] Add netmap contract and node info configs

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
support/v0.27
Alex Vanin 2020-08-31 18:19:21 +03:00
parent c299de5de9
commit 73b8ed4203
1 changed files with 31 additions and 0 deletions

View File

@ -28,7 +28,11 @@ type cfg struct {
cfgContainer cfgContainer
cfgNetmap cfgNetmap
privateTokenStore *tokenStorage.TokenStore
cfgNodeInfo cfgNodeInfo
}
type cfgGRPC struct {
@ -57,6 +61,26 @@ type cfgContainer struct {
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 {
key, err := crypto.LoadPrivateKey("Kwk6k2eC3L3QuPvD8aiaNyoSXgQ2YL1bwS5CP1oKoA9waeAze97s")
fatalOnErr(err)
@ -79,5 +103,12 @@ func defaultCfg() *cfg {
scriptHash: "9d2ca84d7fb88213c4baced5a6ed4dc402309039",
fee: util.Fixed8(1),
},
cfgNetmap: cfgNetmap{
scriptHash: "75194459637323ea8837d2afe8225ec74a5658c3",
fee: util.Fixed8(1),
},
cfgNodeInfo: cfgNodeInfo{
bootType: StorageNode,
},
}
}