Skip to content

Commit

Permalink
node, ir: add debug logs for notary deposits
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Sep 27, 2024
1 parent f7efbe0 commit eaf6b47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cmd/neofs-node/morph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Check warning on line 57 in cmd/neofs-node/morph.go

View check run for this annotation

Codecov / codecov/patch

cmd/neofs-node/morph.go#L57

Added line #L57 was not covered by tests

return c.cfgMorph.client.DepositEndlessNotary(depositAmount)
}

Expand Down
12 changes: 8 additions & 4 deletions pkg/innerring/notary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Check warning on line 37 in pkg/innerring/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/innerring/notary.go#L34-L37

Added lines #L34 - L37 were not covered by tests

return s.mainnetClient.DepositNotary(depositAmount, till)

Check warning on line 39 in pkg/innerring/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/innerring/notary.go#L39

Added line #L39 was not covered by tests
}

func (s *Server) depositSideNotary() error {
Expand All @@ -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))

Check warning on line 48 in pkg/innerring/notary.go

View check run for this annotation

Codecov / codecov/patch

pkg/innerring/notary.go#L48

Added line #L48 was not covered by tests

return s.morphClient.DepositEndlessNotary(depositAmount)
}

Expand Down

0 comments on commit eaf6b47

Please sign in to comment.