[#486] innerring: Add notary support in main chain client

With `mainnet.notary_deposit=false` inner ring will ignore
notary deposit \ awaiting routines in the application start,
so it can run on the environments without notary support.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-04-20 18:16:40 +03:00 committed by Alex Vanin
parent dd1ace12f7
commit bd65e41257
4 changed files with 56 additions and 16 deletions

View file

@ -48,7 +48,7 @@ type (
notaryDepositArgs struct {
l *zap.Logger
depositor func() (util.Uint256, error)
depositor func() (util.Uint256, util.Uint256, error)
notaryDuration uint32 // in blocks
}
@ -145,7 +145,7 @@ func newNotaryDepositTimer(args *notaryDepositArgs) *timer.BlockTimer {
return timer.NewBlockTimer(
timer.StaticBlockMeter(args.notaryDuration),
func() {
_, err := args.depositor()
_, _, err := args.depositor()
if err != nil {
args.l.Warn("can't deposit notary contract",
zap.String("error", err.Error()))