[#770] node: Add notary deposit timer

Storage Node needs to have notary deposit
for successful notary request sending.
Add notary deposit on startup(and wait for
its acceptance). Add notary deposit timer,
its config in `morph` section and env vars
for its tuning.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-08-25 13:49:59 +03:00 committed by Pavel Karpy
parent e29bcd98e2
commit 722b844aa2
4 changed files with 104 additions and 2 deletions

View file

@ -8,6 +8,7 @@ import (
"time"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
neogoutil "github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neofs-api-go/pkg"
apiclient "github.com/nspcc-dev/neofs-api-go/pkg/client"
@ -127,6 +128,10 @@ type cfgGRPC struct {
type cfgMorph struct {
client *client.Client
notaryEnabled bool
notaryDepositAmount fixedn.Fixed8
notaryDepositDuration uint32
disableCache bool
blockTimers []*timer.BlockTimer // all combined timers