bad739258e
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>
28 lines
701 B
Go
28 lines
701 B
Go
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"
|
|
)
|
|
|
|
// Process config event by setting configuration value from main chain in
|
|
// side chain.
|
|
func (np *Processor) processConfig(config *neofsEvent.Config) {
|
|
if !np.alphabetState.IsAlphabet() {
|
|
np.log.Info("non alphabet mode, ignore config")
|
|
return
|
|
}
|
|
|
|
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))
|
|
}
|
|
}
|