diff --git a/CHANGELOG.md b/CHANGELOG.md index ad5a01437..35167b65b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Changelog for NeoFS Node - Pack arguments of `setPrice` invocation during contract update (#2078) - `neofs-cli object hash` panic (#2079) - Closing `neo-go` WS clients on shutdown and switch processes (#2080) +- Making notary deposits with a zero GAS balance (#2080) ### Removed - `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands (#2089) diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index 5122b550b..0b9c72c41 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -825,6 +825,10 @@ func CalculateNotaryDepositAmount(c *Client, gasMul, gasDiv int64) (fixedn.Fixed return 0, fmt.Errorf("could not get GAS balance: %w", err) } + if gasBalance == 0 { + return 0, errors.New("zero gas balance, nothing to deposit") + } + var depositAmount int64 if gasBalance*gasMul > notaryBalance {