forked from TrueCloudLab/frostfs-node
[#873] innerring: Delete duration from notary configs
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
e5748bfc96
commit
4afccab015
2 changed files with 5 additions and 11 deletions
|
@ -808,9 +808,8 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
// initialize notary timers
|
// initialize notary timers
|
||||||
if !server.mainNotaryConfig.disabled {
|
if !server.mainNotaryConfig.disabled {
|
||||||
mainNotaryTimer := newNotaryDepositTimer(¬aryDepositArgs{
|
mainNotaryTimer := newNotaryDepositTimer(¬aryDepositArgs{
|
||||||
l: log,
|
l: log,
|
||||||
depositor: server.depositMainNotary,
|
depositor: server.depositMainNotary,
|
||||||
notaryDuration: server.mainNotaryConfig.duration,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
server.addBlockTimer(mainNotaryTimer)
|
server.addBlockTimer(mainNotaryTimer)
|
||||||
|
@ -818,9 +817,8 @@ func New(ctx context.Context, log *zap.Logger, cfg *viper.Viper) (*Server, error
|
||||||
|
|
||||||
if !server.sideNotaryConfig.disabled {
|
if !server.sideNotaryConfig.disabled {
|
||||||
sideNotaryTimer := newNotaryDepositTimer(¬aryDepositArgs{
|
sideNotaryTimer := newNotaryDepositTimer(¬aryDepositArgs{
|
||||||
l: log,
|
l: log,
|
||||||
depositor: server.depositSideNotary,
|
depositor: server.depositSideNotary,
|
||||||
notaryDuration: server.sideNotaryConfig.duration,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
server.addBlockTimer(sideNotaryTimer)
|
server.addBlockTimer(sideNotaryTimer)
|
||||||
|
|
|
@ -11,8 +11,7 @@ import (
|
||||||
|
|
||||||
type (
|
type (
|
||||||
notaryConfig struct {
|
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.disabled = !withMainNotary
|
||||||
main.duration = cfg.GetUint32("timers.main_notary")
|
|
||||||
|
|
||||||
side.duration = cfg.GetUint32("timers.side_notary")
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue