From 4afccab015426d5dcb50e24edcea67550c82cf6b Mon Sep 17 00:00:00 2001
From: Pavel Karpy <carpawell@nspcc.ru>
Date: Tue, 12 Oct 2021 16:56:16 +0300
Subject: [PATCH] [#873] innerring: Delete duration from notary configs

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
---
 pkg/innerring/innerring.go | 10 ++++------
 pkg/innerring/notary.go    |  6 +-----
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go
index ae2e695bbf..3f5520e03b 100644
--- a/pkg/innerring/innerring.go
+++ b/pkg/innerring/innerring.go
@@ -808,9 +808,8 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
 	// initialize notary timers
 	if !server.mainNotaryConfig.disabled {
 		mainNotaryTimer := newNotaryDepositTimer(&notaryDepositArgs{
-			l:              log,
-			depositor:      server.depositMainNotary,
-			notaryDuration: server.mainNotaryConfig.duration,
+			l:         log,
+			depositor: server.depositMainNotary,
 		})
 
 		server.addBlockTimer(mainNotaryTimer)
@@ -818,9 +817,8 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
 
 	if !server.sideNotaryConfig.disabled {
 		sideNotaryTimer := newNotaryDepositTimer(&notaryDepositArgs{
-			l:              log,
-			depositor:      server.depositSideNotary,
-			notaryDuration: server.sideNotaryConfig.duration,
+			l:         log,
+			depositor: server.depositSideNotary,
 		})
 
 		server.addBlockTimer(sideNotaryTimer)
diff --git a/pkg/innerring/notary.go b/pkg/innerring/notary.go
index f43a302d2f..0d8965712e 100644
--- a/pkg/innerring/notary.go
+++ b/pkg/innerring/notary.go
@@ -11,8 +11,7 @@ import (
 
 type (
 	notaryConfig struct {
-		duration uint32 // lifetime of notary deposit in blocks
-		disabled bool   // true if notary disabled on chain
+		disabled bool // true if notary disabled on chain
 	}
 )
 
@@ -105,9 +104,6 @@ func parseNotaryConfigs(cfg *viper.Viper, withSideNotary, withMainNotary bool) (
 	}
 
 	main.disabled = !withMainNotary
-	main.duration = cfg.GetUint32("timers.main_notary")
-
-	side.duration = cfg.GetUint32("timers.side_notary")
 
 	return
 }