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:
parent
4c3a44e0cf
commit
140f810d1f
3 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue