Skip to content

Commit

Permalink
morph: Fix estimations announcements
Browse files Browse the repository at this point in the history
Some contract methods still require regular (non-notary) calls.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Aug 2, 2023
1 parent aeab4ca commit 21fa739
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/neofs-node/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
func initContainerService(c *cfg) {
// container wrapper that tries to invoke notary
// requests if chain is configured so
wrap, err := cntClient.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0)
wrap, err := cntClient.NewFromMorph(c.cfgMorph.client, c.cfgContainer.scriptHash, 0, cntClient.TryNotary())
fatalOnErr(err)

c.shared.cnrClient = wrap
Expand Down
12 changes: 9 additions & 3 deletions pkg/morph/client/container/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,15 @@ type opts struct {
}

func defaultOpts() *opts {
var o = new(opts)
o.staticOpts = append(o.staticOpts, client.TryNotary())
return o
return new(opts)
}

// TryNotary returns option to enable
// notary invocation tries.
func TryNotary() Option {
return func(o *opts) {
o.staticOpts = append(o.staticOpts, client.TryNotary())
}
}

// AsAlphabet returns option to sign main TX
Expand Down

0 comments on commit 21fa739

Please sign in to comment.