Skip to content

Commit

Permalink
node: Use header limit from SDK (#2760)
Browse files Browse the repository at this point in the history
node: Use header limit from SDK
  • Loading branch information
roman-khimov authored Mar 22, 2024
2 parents 0644188 + 739699e commit d2b2bfd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/nspcc-dev/neo-go v0.105.1
github.com/nspcc-dev/neofs-api-go/v2 v2.14.1-0.20240228163253-cb87bbd5e4eb
github.com/nspcc-dev/neofs-contract v0.19.1
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240228185329-d1bb0881274a
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338
github.com/nspcc-dev/tzhash v1.8.0
github.com/olekukonko/tablewriter v0.0.5
github.com/panjf2000/ants/v2 v2.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ github.com/nspcc-dev/neofs-contract v0.19.1 h1:U1Uh+MlzfkalO0kRJ2pADZyHrmAOroC6K
github.com/nspcc-dev/neofs-contract v0.19.1/go.mod h1:ZOGouuwuHpgvYkx/LCGufGncIzEUhYEO18LL4cWEbyw=
github.com/nspcc-dev/neofs-crypto v0.4.1 h1:B6S0zXMWrVFlf/GlII6xKRGWU0VE7dHM+QkoKAO7AQA=
github.com/nspcc-dev/neofs-crypto v0.4.1/go.mod h1:0SHn+sSn+lrrIvonLR8MgbOlBhXZKhc4rw/l2htYeA0=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240228185329-d1bb0881274a h1:YbLj8AtTVGvQ5Mi482dmftKIimqTsI5OXxjIPJefzEo=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240228185329-d1bb0881274a/go.mod h1:0WwnMTpMvbeKkU57+aLRtpOB7vu0eIpz7bu342ng8Gk=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338 h1:MIOkxFQCxZCRL34hRdmwx+SyljvhXSAqBC1IujH5kdA=
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11.0.20240320182730-5b6b37a2d338/go.mod h1:y4oCltutxqnAAsXPKSNarCIp2fWY9keyZW6ZqNzyrEs=
github.com/nspcc-dev/rfc6979 v0.2.1 h1:8wWxkamHWFmO790GsewSoKUSJjVnL1fmdRpokU/RgRM=
github.com/nspcc-dev/rfc6979 v0.2.1/go.mod h1:Tk7h5kyUWkhjyO3zUgFFhy1v2vQv3BvQEntakdtqrWc=
github.com/nspcc-dev/tzhash v1.8.0 h1:pJvzME2mZzP/h5rcy/Wb6amT9FJBFeKbJ3HEnWEeUpY=
Expand Down
5 changes: 3 additions & 2 deletions pkg/services/object/acl/v2/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
objectsdk "github.com/nspcc-dev/neofs-sdk-go/object"
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
sessionSDK "github.com/nspcc-dev/neofs-sdk-go/session"
"github.com/nspcc-dev/neofs-sdk-go/user"
Expand Down Expand Up @@ -541,8 +542,8 @@ func (p putStreamBasicChecker) Send(request *objectV2.PutRequest) error {
// should not prevent the replication of objects created before.
// See also https://github.com/nspcc-dev/neofs-api/issues/293
hdrLen := part.GetHeader().StableSize()
if hdrLen > 16<<10 {
return fmt.Errorf("object header length exceeds the limit: %d>%d", hdrLen, 16<<10)
if hdrLen > objectsdk.MaxHeaderLen {
return fmt.Errorf("object header length exceeds the limit: %d>%d", hdrLen, objectsdk.MaxHeaderLen)
}
}

Expand Down

0 comments on commit d2b2bfd

Please sign in to comment.