nodeconf interfaces

This commit is contained in:
Sergey Cherepanov authored and Mikhail Iudin committed 2023-04-06 19:02:18 +02:00
1 parent 4ea2953045
commit 18db36a70a
11 files changed
+233 -540

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import (
"github.com/anytypeio/any-sync/app"
"github.com/anytypeio/any-sync/commonspace/object/accountdata"
"github.com/anytypeio/any-sync/nodeconf"
"github.com/anytypeio/any-sync/nodeconf/nodeconfstore"
"github.com/anytypeio/any-sync/util/crypto"
)
@@ -47,8 +48,8 @@ func (s *AccountTestService) Account() *accountdata.AccountKeys {
return s.acc
}
func (s *AccountTestService) NodeConf(addrs []string) nodeconf.NodeConfig {
return nodeconf.NodeConfig{
func (s *AccountTestService) NodeConf(addrs []string) nodeconfstore.NodeConfig {
return nodeconfstore.NodeConfig{
PeerId: s.acc.PeerId,
Addresses: addrs,
Types: []nodeconf.NodeType{nodeconf.NodeTypeTree},
+3 -3
View File
@@ -3,7 +3,7 @@ package testnodeconf
import (
"github.com/anytypeio/any-sync/accountservice"
"github.com/anytypeio/any-sync/app"
"github.com/anytypeio/any-sync/nodeconf"
"github.com/anytypeio/any-sync/nodeconf/nodeconfstore"
"github.com/anytypeio/any-sync/testutil/accounttest"
)
@@ -24,7 +24,7 @@ func GenNodeConfig(num int) (conf *Config) {
}
type Config struct {
nodes []nodeconf.NodeConfig
nodes []nodeconfstore.NodeConfig
configs []*accounttest.AccountTestService
}
@@ -35,7 +35,7 @@ func (c *Config) GetNodesConfId() string {
return "test"
}
func (c *Config) GetNodes() []nodeconf.NodeConfig {
func (c *Config) GetNodes() []nodeconfstore.NodeConfig {
return c.nodes
}