[#505] ir/container: Use client wrapper with enabled notary calls

Construct wrapper over the Container contract client with `TryNotary` option
since it is required to perform invocations of notary contract.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-25 15:19:22 +03:00 committed by Alex Vanin
parent 8d201f920e
commit 017fb6abed
3 changed files with 2 additions and 3 deletions

View file

@ -357,7 +357,7 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
return nil, err
}
cnrClient, err := cntWrapper.NewFromMorph(server.morphClient, server.contracts.container, fee)
cnrClient, err := cntWrapper.NewFromMorph(server.morphClient, server.contracts.container, fee, cntWrapper.TryNotary())
if err != nil {
return nil, err
}

View file

@ -65,7 +65,6 @@ func (cp *Processor) checkPutContainer(e *containerEvent.Put) error {
}
func (cp *Processor) approvePutContainer(e *containerEvent.Put) {
// FIXME: here we should try notary invoke
// FIXME: here we should bind key to owner if needed
err := cp.cnrClient.Put(e.Container(), e.PublicKey(), e.Signature())
if err != nil {

View file

@ -29,7 +29,7 @@ type (
morphClient *client.Client
alphabetState AlphabetState
feeProvider *config.FeeConfig
cnrClient *wrapper.Wrapper
cnrClient *wrapper.Wrapper // notary must be enabled
idClient *neofsid.ClientWrapper
}