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

set Id to -1 to re-pull configuration from consesus node

This commit is contained in:
Anatolii Smolianinov 2024-09-19 15:19:42 +02:00
parent c6441686af
commit 75bdfb2ddf
No known key found for this signature in database
GPG key ID: 5E259D1D468B99F4

View file

@ -122,7 +122,8 @@ func (s *service) Init(a *app.App) (err error) {
// merge coordinator nodes from app config to lasStored to have up-to-date coordinator
mustRewriteLocalConfig := mergeCoordinatorAddrs(&s.config, &lastStored)
if mustRewriteLocalConfig {
// saving last configuration if changed, which also triggers Configuration.Id change
// saving last configuration if changed
lastStored.Id = "-1" // forces configuration to be re-pulled from consensus node
err = s.saveAndSetLastConfiguration(context.Background(), lastStored)
if err != nil {
return