expose nodeconf config getter

This commit is contained in:
Sergey Cherepanov 2023-03-26 16:22:18 +02:00 committed by Mikhail Iudin
parent f9b306abc7
commit 16daf32edb
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ const (
NodeTypeCoordinator NodeType = "coordinator"
)
type configGetter interface {
type ConfigGetter interface {
GetNodes() []NodeConfig
}

View File

@ -48,7 +48,7 @@ func (n *Node) Capacity() float64 {
}
func (s *service) Init(a *app.App) (err error) {
nodesConf := a.MustComponent("config").(configGetter).GetNodes()
nodesConf := a.MustComponent("config").(ConfigGetter).GetNodes()
s.accountId = a.MustComponent(commonaccount.CName).(commonaccount.Service).Account().PeerId
fileConfig := &configuration{