[#1253] ir: Update AddPeer method name for notary enabled env

`Register` was renamed to `AddPeerIR` for consistency with
`UpdateState` changes in
https://github.com/nspcc-dev/neofs-contract/pull/227

This is protocol breaking change for notary enabled environment.
Luckily, there is no notary enabled environments anywhere except
of neofs-dev-env, so we can do such thing. We should avoid such
changes in the future, though.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-22 11:48:00 +03:00 committed by Alex Vanin
parent 414ba6e0a2
commit e81081e0e0

View file

@ -88,10 +88,10 @@ func (np *Processor) processAddPeer(ev netmapEvent.AddPeer) {
prm := netmapclient.AddPeerPrm{}
prm.SetNodeInfo(nodeInfo)
// In notary environments we call Register method instead of AddPeer.
// In notary environments we call AddPeerIR method instead of AddPeer.
// It differs from AddPeer only by name, so we can do this in the same form.
// See https://github.com/nspcc-dev/neofs-contract/issues/154.
const methodAddPeerNotary = "register"
const methodAddPeerNotary = "addPeerIR"
if nr := ev.NotaryRequest(); nr != nil {
// create new notary request with the original nonce