[#219] morph: Resolve containedctx linter

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-05 16:58:32 +03:00
parent 56282edf02
commit e815b19101
9 changed files with 43 additions and 54 deletions

View file

@ -27,7 +27,7 @@ const (
notaryDepositRetriesAmount = 300
)
func initMorphComponents(c *cfg) {
func initMorphComponents(ctx context.Context, c *cfg) {
var err error
addresses := morphconfig.RPCEndpoint(c.appCfg)
@ -38,7 +38,8 @@ func initMorphComponents(c *cfg) {
addresses[i], addresses[j] = addresses[j], addresses[i]
})
cli, err := client.New(c.key,
cli, err := client.New(ctx,
c.key,
client.WithDialTimeout(morphconfig.DialTimeout(c.appCfg)),
client.WithLogger(c.log),
client.WithEndpoints(addresses...),