From eaf6b47442fdab0672f9bdde4640aec8900ee07b Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Fri, 27 Sep 2024 18:48:43 +0300 Subject: [PATCH] node, ir: add debug logs for notary deposits Signed-off-by: Pavel Karpy --- cmd/neofs-node/morph.go | 2 ++ pkg/innerring/notary.go | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cmd/neofs-node/morph.go b/cmd/neofs-node/morph.go index 34444472d5..99ef59f922 100644 --- a/cmd/neofs-node/morph.go +++ b/cmd/neofs-node/morph.go @@ -54,6 +54,8 @@ func makeNotaryDeposit(c *cfg) error { return fmt.Errorf("could not calculate notary deposit: %w", err) } + c.log.Debug("making neofs chain notary deposit", zap.Stringer("fixed8 deposit", depositAmount)) + return c.cfgMorph.client.DepositEndlessNotary(depositAmount) } diff --git a/pkg/innerring/notary.go b/pkg/innerring/notary.go index 624cd8ccae..2106b246b3 100644 --- a/pkg/innerring/notary.go +++ b/pkg/innerring/notary.go @@ -31,10 +31,12 @@ func (s *Server) depositMainNotary() error { return fmt.Errorf("could not calculate main notary deposit amount: %w", err) } - return s.mainnetClient.DepositNotary( - depositAmount, - uint32(s.epochDuration.Load())+notaryExtraBlocks, - ) + till := uint32(s.epochDuration.Load()) + notaryExtraBlocks + s.log.Debug("making main chain notary deposit", + zap.Stringer("fixed8 deposit", depositAmount), + zap.Uint32("till", till)) + + return s.mainnetClient.DepositNotary(depositAmount, till) } func (s *Server) depositSideNotary() error { @@ -43,6 +45,8 @@ func (s *Server) depositSideNotary() error { return fmt.Errorf("could not calculate side notary deposit amount: %w", err) } + s.log.Debug("making neofs chain endless notary deposit", zap.Stringer("fixed8 deposit", depositAmount)) + return s.morphClient.DepositEndlessNotary(depositAmount) }