diff --git a/pkg/innerring/invoke/neofs.go b/pkg/innerring/invoke/neofs.go index b6ace9926..e7ad54dc8 100644 --- a/pkg/innerring/invoke/neofs.go +++ b/pkg/innerring/invoke/neofs.go @@ -29,6 +29,11 @@ const ( // execution stage. Otherwise invocation will fail due to gas limit. extraFee = 1_5000_0000 // 1.5 Fixed8 gas + // Different methods need different extra fee values, so with this + // constants let's try to minimize spent GAS of inner ring node. + feeHalfGas = 50_000_000 // 0.5 Fixed8 gas + feeOneGas = feeHalfGas * 2 // 1.0 Fixed8 gas + checkIsInnerRingMethod = "isInnerRing" innerRingListMethod = "innerRingList" chequeMethod = "cheque" diff --git a/pkg/innerring/invoke/netmap.go b/pkg/innerring/invoke/netmap.go index f5100989e..7f71321f2 100644 --- a/pkg/innerring/invoke/netmap.go +++ b/pkg/innerring/invoke/netmap.go @@ -52,7 +52,7 @@ func SetNewEpoch(cli *client.Client, con util.Uint160, epoch uint64) error { return client.ErrNilClient } - return cli.Invoke(con, extraFee, setNewEpochMethod, int64(epoch)) + return cli.Invoke(con, feeOneGas, setNewEpochMethod, int64(epoch)) } // ApprovePeer invokes addPeer method. @@ -61,7 +61,7 @@ func ApprovePeer(cli *client.Client, con util.Uint160, peer []byte) error { return client.ErrNilClient } - return cli.Invoke(con, extraFee, approvePeerMethod, peer) + return cli.Invoke(con, feeHalfGas, approvePeerMethod, peer) } // UpdatePeerState invokes addPeer method.