Skip to content

Commit

Permalink
morph: add method for container's new metainfo method
Browse files Browse the repository at this point in the history
Follows nspcc-dev/neofs-contract#414.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
  • Loading branch information
carpawell committed Dec 11, 2024
1 parent 11c282d commit 3105323
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/morph/client/container/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const (

addNextEpochNodes = "addNextEpochNodes"
commitContainerListUpdate = "commitContainerListUpdate"
submitObjectPutMethod = "submitObjectPut"
)

var (
Expand Down
27 changes: 27 additions & 0 deletions pkg/morph/client/container/meta.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package container

import (
"fmt"

"github.com/nspcc-dev/neofs-node/pkg/morph/client"
)

// SubmitObjectPut puts object meta information.
//
// Returns any error encountered that caused the saving to interrupt.
func (c *Client) SubmitObjectPut(meta []byte, sigs [][]byte) error {
if len(meta) == 0 || len(sigs) == 0 {
return errNilArgument
}

var prm client.InvokePrm
prm.SetMethod(submitObjectPutMethod)
prm.SetArgs(meta, sigs)

err := c.client.Invoke(prm)
if err != nil {
return fmt.Errorf("could not invoke method (%s): %w", submitObjectPutMethod, err)
}

return nil
}

0 comments on commit 3105323

Please sign in to comment.