forked from TrueCloudLab/frostfs-node
[#873] node: Use dynamic notary deposit duration
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
5e816dc01a
commit
2a3a6cc0ba
2 changed files with 6 additions and 4 deletions
|
@ -133,9 +133,14 @@ func makeNotaryDeposit(c *cfg) (util.Uint256, error) {
|
|||
return util.Uint256{}, fmt.Errorf("could not calculate notary deposit: %w", err)
|
||||
}
|
||||
|
||||
epochDur, err := c.cfgNetmap.wrapper.EpochDuration()
|
||||
if err != nil {
|
||||
return util.Uint256{}, fmt.Errorf("could not get current epoch duration: %w", err)
|
||||
}
|
||||
|
||||
return c.cfgMorph.client.DepositNotary(
|
||||
depositAmount,
|
||||
c.cfgMorph.notaryDepositDuration+notaryDepositExtraBlocks,
|
||||
uint32(epochDur)+notaryDepositExtraBlocks,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue