[#1437] node: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6921a89061
commit
7429553266
209 changed files with 1068 additions and 1036 deletions
|
@ -1,6 +1,7 @@
|
|||
package netmap
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-contract/netmap"
|
||||
|
@ -36,7 +37,7 @@ func (u *UpdatePeerPrm) SetMaintenance() {
|
|||
}
|
||||
|
||||
// UpdatePeerState changes peer status through Netmap contract call.
|
||||
func (c *Client) UpdatePeerState(p UpdatePeerPrm) (uint32, error) {
|
||||
func (c *Client) UpdatePeerState(ctx context.Context, p UpdatePeerPrm) (uint32, error) {
|
||||
method := updateStateMethod
|
||||
|
||||
if c.client.WithNotary() && c.client.IsAlpha() {
|
||||
|
@ -55,7 +56,7 @@ func (c *Client) UpdatePeerState(p UpdatePeerPrm) (uint32, error) {
|
|||
prm.SetArgs(int64(p.state), p.key)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
res, err := c.client.Invoke(prm)
|
||||
res, err := c.client.Invoke(ctx, prm)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("could not invoke smart contract: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue