forked from TrueCloudLab/frostfs-contract
[#146] netmap: allow to update peer info
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
7fe7188e7d
commit
a72392f672
3 changed files with 64 additions and 6 deletions
|
@ -191,6 +191,7 @@ func UpdateInnerRing(keys []interop.PublicKey) {
|
|||
// by Alphabet node. If it was invoked by node candidate, it produces AddPeer
|
||||
// notification. Otherwise method throws panic.
|
||||
//
|
||||
// If the candidate already exists, it's info is updated.
|
||||
// NodeInfo argument contains stable marshaled version of netmap.NodeInfo
|
||||
// structure.
|
||||
func AddPeer(nodeInfo []byte) {
|
||||
|
@ -519,11 +520,6 @@ func addToNetmap(ctx storage.Context, n storageNode) {
|
|||
}
|
||||
)
|
||||
|
||||
data := storage.Get(ctx, storageKey)
|
||||
if data != nil {
|
||||
return
|
||||
}
|
||||
|
||||
storage.Put(ctx, storageKey, std.Serialize(node))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue