forked from TrueCloudLab/frostfs-node
[#496] innerring/invoke: remove function wrappers
Use morph.Client directly. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
b5cda8cd41
commit
ca0e3211be
19 changed files with 181 additions and 523 deletions
|
@ -3,10 +3,11 @@ package netmap
|
|||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/innerring/invoke"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const updatePeerStateMethod = "updateState"
|
||||
|
||||
func (np *Processor) processNetmapCleanupTick(epoch uint64) {
|
||||
if !np.alphabetState.IsAlphabet() {
|
||||
np.log.Info("non alphabet mode, ignore new netmap cleanup tick")
|
||||
|
@ -25,11 +26,9 @@ func (np *Processor) processNetmapCleanupTick(epoch uint64) {
|
|||
|
||||
np.log.Info("vote to remove node from netmap", zap.String("key", s))
|
||||
|
||||
err = invoke.UpdatePeerState(np.morphClient, np.netmapContract, np.feeProvider,
|
||||
&invoke.UpdatePeerArgs{
|
||||
Key: key,
|
||||
Status: netmap.NodeStateOffline,
|
||||
})
|
||||
err = np.morphClient.NotaryInvoke(np.netmapContract, np.feeProvider.SideChainFee(), updatePeerStateMethod,
|
||||
int64(netmap.NodeStateOffline.ToV2()),
|
||||
key.Bytes())
|
||||
if err != nil {
|
||||
np.log.Error("can't invoke netmap.UpdateState", zap.Error(err))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue