From 5d1731f9c1126b60031f41427f4f1709a888545e Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Tue, 24 Dec 2024 00:50:00 +0300 Subject: [PATCH] container/meta: make `validuntil` camel-cased Follows https://github.com/nspcc-dev/neofs-node/pull/3063. Signed-off-by: Pavel Karpy --- contracts/container/contract.go | 2 +- tests/container_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/container/contract.go b/contracts/container/contract.go index 6cebde92..cf1ebde3 100644 --- a/contracts/container/contract.go +++ b/contracts/container/contract.go @@ -280,7 +280,7 @@ func SubmitObjectPut(metaInformation []byte, sigs [][]interop.Signature) { panic("incorrect " + std.Itoa10(i) + " locked object") } } - vub := getFromMap(metaMap, "validuntil").(int) + vub := getFromMap(metaMap, "validUntil").(int) if vub <= ledger.CurrentIndex() { panic("incorrect vub: exceeded") } diff --git a/tests/container_test.go b/tests/container_test.go index 377c31c9..47c70e89 100644 --- a/tests/container_test.go +++ b/tests/container_test.go @@ -877,7 +877,7 @@ func TestPutMeta(t *testing.T) { testFunc("size") testFunc("deleted") testFunc("locked") - testFunc("validuntil") + testFunc("validUntil") }) t.Run("incorrect values", func(t *testing.T) { @@ -895,7 +895,7 @@ func TestPutMeta(t *testing.T) { testFunc("network", netmode.UnitTestNet+1) testFunc("deleted", []any{[]byte{1}}) testFunc("locked", []any{[]byte{1}}) - testFunc("validuntil", 1) // tested chain will have some blocks for sure + testFunc("validUntil", 1) // tested chain will have some blocks for sure }) }) } @@ -910,6 +910,6 @@ func testMeta(cid, oid []byte) *stackitem.Map { {Key: stackitem.Make("size"), Value: stackitem.Make(123)}, {Key: stackitem.Make("deleted"), Value: stackitem.Make([]any{randomBytes(sha256.Size)})}, {Key: stackitem.Make("locked"), Value: stackitem.Make([]any{randomBytes(sha256.Size)})}, - {Key: stackitem.Make("validuntil"), Value: stackitem.Make(math.MaxInt)}, + {Key: stackitem.Make("validUntil"), Value: stackitem.Make(math.MaxInt)}, }) }