1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

nodeconf interfaces

This commit is contained in:
Sergey Cherepanov 2023-04-06 19:02:18 +02:00 committed by Mikhail Iudin
parent 4ea2953045
commit 18db36a70a
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
11 changed files with 233 additions and 540 deletions

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},

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
}