Persist Network Serial to Store to avoid outdated netmap sent (#260)

Fix outdated update coming from management
even when it is actually not outdated.
This commit is contained in:
Mikhail Bragin
2022-03-10 18:18:38 +01:00
committed by GitHub
parent 8cc93e0dbe
commit be0c5c887c
8 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -142,7 +142,7 @@ func (am *DefaultAccountManager) DeletePeer(accountId string, peerKey string) (*
RemotePeersIsEmpty: true,
// new field
NetworkMap: &proto.NetworkMap{
Serial: account.Network.Serial(),
Serial: account.Network.CurrentSerial(),
RemotePeers: []*proto.RemotePeerConfig{},
RemotePeersIsEmpty: true,
},
@@ -173,7 +173,7 @@ func (am *DefaultAccountManager) DeletePeer(accountId string, peerKey string) (*
RemotePeersIsEmpty: len(update) == 0,
// new field
NetworkMap: &proto.NetworkMap{
Serial: account.Network.Serial(),
Serial: account.Network.CurrentSerial(),
RemotePeers: update,
RemotePeersIsEmpty: len(update) == 0,
},