Skip to content

Commit

Permalink
container/meta: make validuntil camel-cased
Browse files Browse the repository at this point in the history
Follows nspcc-dev/neofs-node#3063.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Dec 23, 2024
1 parent 416936f commit 5deadec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/container/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
Binary file modified contracts/container/contract.nef
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
})
})
}
Expand All @@ -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)},
})
}

0 comments on commit 5deadec

Please sign in to comment.