[#1577] node/container: Fix typo
All checks were successful
DCO action / DCO (pull_request) Successful in 44s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m52s
Vulncheck / Vulncheck (pull_request) Successful in 1m31s
Tests and linters / Run gofumpt (pull_request) Successful in 1m37s
Build / Build Components (pull_request) Successful in 1m54s
Tests and linters / gopls check (pull_request) Successful in 2m30s
Tests and linters / Staticcheck (pull_request) Successful in 2m21s
Tests and linters / Tests (pull_request) Successful in 2m32s
Tests and linters / Lint (pull_request) Successful in 3m4s
Tests and linters / Tests with -race (pull_request) Successful in 4m17s
Tests and linters / Run gofumpt (push) Successful in 1m25s
Vulncheck / Vulncheck (push) Successful in 1m35s
Pre-commit hooks / Pre-commit (push) Successful in 1m53s
Build / Build Components (push) Successful in 1m56s
Tests and linters / Tests (push) Successful in 2m6s
Tests and linters / Staticcheck (push) Successful in 2m15s
Tests and linters / gopls check (push) Successful in 2m30s
Tests and linters / Tests with -race (push) Successful in 2m44s
Tests and linters / Lint (push) Successful in 3m1s

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
Ekaterina Lebedeva 2024-12-27 15:31:06 +03:00
parent 242f0095d0
commit c0221d76e6
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@ const (
subsection = "container"
listStreamSubsection = "list_stream"
// ContainerBatchSizeDefault represents he maximum amount of containers to send via stream at once.
// ContainerBatchSizeDefault represents the maximum amount of containers to send via stream at once.
ContainerBatchSizeDefault = 1000
)

View file

@ -36,7 +36,6 @@ func (c *Client) IterateContainersOf(idUser *user.ID, cb func(item cid.ID) error
rawID = idUser.WalletBytes()
}
cnrHash := c.client.ContractAddress()
itemCb := func(item stackitem.Item) error {
id, err := getCIDfromStackItem(item)
if err != nil {
@ -57,6 +56,7 @@ func (c *Client) IterateContainersOf(idUser *user.ID, cb func(item cid.ID) error
// 512 is big enough value and it is beautiful.
const batchSize = 512
cnrHash := c.client.ContractAddress()
err := c.client.Morph().TestInvokeIterator(itemCb, batchSize, cnrHash, containersOfMethod, rawID)
if err != nil && errors.Is(err, unwrap.ErrNoSessionID) {
return c.iterate(idUser, cb)