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

Make ConfigurationToNodeConf private

This commit is contained in:
Anton Akentev 2023-11-06 17:15:28 +00:00
parent 4c3a44e0cf
commit 140f810d1f
3 changed files with 4 additions and 4 deletions

View file

@ -130,7 +130,7 @@ func ReplKey(spaceId string) (replKey string) {
return spaceId
}
func ConfigurationToNodeConf(c Configuration) (nc *nodeConf, err error) {
func сonfigurationToNodeConf(c Configuration) (nc *nodeConf, err error) {
nc = &nodeConf{
id: c.Id,
c: c,

View file

@ -150,13 +150,13 @@ creationTime: 2023-07-21T11:51:12.970882+01:00
log.Info("conf", zap.Any("conf", conf))
nodeConf, err := ConfigurationToNodeConf(conf)
nodeConf, err := сonfigurationToNodeConf(conf)
require.NoError(t, err)
assert.Equal(t, "64ba63209976be4a733bbb91", nodeConf.Id())
assert.Equal(t, "N4Gvo3v5wL31RrYgX3PrhAGMYvdWe5rAgtVB8cZySYWrkhb6", nodeConf.c.NetworkId)
// should not be set by ConfigurationToNodeConf
// should not be set by сonfigurationToNodeConf
assert.Equal(t, "", nodeConf.accountId)
assert.Equal(t, []string{"12D3KooYYYEXV3KjBxEU5EnsPfneLx84vMWAtTBQBeyooN82KSuS"}, nodeConf.FilePeers())
assert.Equal(t, []string{"consensus1", "consensus2"}, nodeConf.ConsensusPeers())

View file

@ -118,7 +118,7 @@ func (s *service) setLastConfiguration(c Configuration) (err error) {
return
}
nc, err := ConfigurationToNodeConf(c)
nc, err := сonfigurationToNodeConf(c)
if err != nil {
return
}