Skip to content

Commit 00c7b83

Browse files
committed
WIP: unit tests
Signed-off-by: Leonard Lyubich <[email protected]>
1 parent 3bf58af commit 00c7b83

File tree

2 files changed

+507
-5
lines changed

2 files changed

+507
-5
lines changed

pkg/local_object_storage/metabase/metadata.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ var (
3030
maxUint256Neg = new(big.Int).Neg(maxUint256)
3131
)
3232

33-
// TODO: fill on Init
34-
// TODO: system attributes
33+
// TODO: fill on migration
34+
// TODO: sort integers in buckets naturally
3535
func putMetadata(tx *bbolt.Tx, cnr cid.ID, id oid.ID, ver version.Version, owner user.ID, typ object.Type, creationEpoch uint64,
3636
payloadLen uint64, pldHash, pldHmmHash, splitID []byte, parentID, firstID oid.ID, attrs []object.Attribute) error {
3737
mb, err := tx.CreateBucketIfNotExists(metaBucketKey(cnr))
@@ -86,7 +86,6 @@ func putMetadata(tx *bbolt.Tx, cnr cid.ID, id oid.ID, ver version.Version, owner
8686
return nil
8787
}
8888
putInt := func(attr string, n *big.Int) error {
89-
// TODO: check uint256 overflow
9089
kLn, vOff := makeKeyB(metaPrefixBI, attr, 1+32) // sign + 256-bit. Sign makes some sensible order
9190
if n.Sign() >= 0 {
9291
k[vOff] = 1

0 commit comments

Comments
 (0)