forked from TrueCloudLab/frostfs-node
[#11] Rename neofs
contract to frostfs
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
e355442532
commit
19d180b510
28 changed files with 18 additions and 18 deletions
28
pkg/innerring/processors/frostfs/process_config.go
Normal file
28
pkg/innerring/processors/frostfs/process_config.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package frostfs
|
||||
|
||||
import (
|
||||
nmClient "github.com/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
|
||||
frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Process config event by setting configuration value from the mainchain in
|
||||
// the sidechain.
|
||||
func (np *Processor) processConfig(config *frostfsEvent.Config) {
|
||||
if !np.alphabetState.IsAlphabet() {
|
||||
np.log.Info("non alphabet mode, ignore config")
|
||||
return
|
||||
}
|
||||
|
||||
prm := nmClient.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))
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue