[#971] *: Add notification TX hash to neofs/netmap morph client calls

Add hash of the TX that generated notification
to neofs/netmap event structures. Adapt all
neofs/netmap wrapper calls to new structures.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-11-10 14:05:51 +03:00 committed by Alex Vanin
parent c25f5a86ae
commit bad739258e
19 changed files with 220 additions and 60 deletions

View file

@ -1,6 +1,7 @@
package neofs
import (
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
neofsEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/neofs"
"go.uber.org/zap"
)
@ -13,7 +14,14 @@ func (np *Processor) processConfig(config *neofsEvent.Config) {
return
}
err := np.netmapClient.SetConfig(config.ID(), config.Key(), config.Value())
prm := wrapper.SetConfigPrm{}
prm.SetID(config.ID())
prm.SetKey(config.Key())
prm.SetValue(config.Value())
prm.SetHash(config.TxHash())
err := np.netmapClient.SetConfig(prm)
if err != nil {
np.log.Error("can't relay set config event", zap.Error(err))
}