[#1369] checksum: Upgrade SDK package

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-11 19:35:01 +03:00 committed by LeL
parent 088df0e2a9
commit ae92074272
16 changed files with 96 additions and 56 deletions

View file

@ -358,16 +358,18 @@ func TestDB_SelectPayloadHash(t *testing.T) {
err = putBig(db, raw2)
require.NoError(t, err)
cs, _ := raw1.PayloadChecksum()
fs := objectSDK.SearchFilters{}
fs.AddFilter(v2object.FilterHeaderPayloadHash,
hex.EncodeToString(raw1.PayloadChecksum().Sum()),
hex.EncodeToString(cs.Value()),
objectSDK.MatchStringEqual)
testSelect(t, db, cid, fs, object.AddressOf(raw1))
fs = objectSDK.SearchFilters{}
fs.AddFilter(v2object.FilterHeaderPayloadHash,
hex.EncodeToString(raw1.PayloadChecksum().Sum()),
hex.EncodeToString(cs.Value()),
objectSDK.MatchStringNotEqual)
testSelect(t, db, cid, fs, object.AddressOf(raw2))
@ -407,16 +409,18 @@ func TestDB_SelectWithSlowFilters(t *testing.T) {
require.NoError(t, err)
t.Run("object with TZHash", func(t *testing.T) {
cs, _ := raw1.PayloadHomomorphicHash()
fs := objectSDK.SearchFilters{}
fs.AddFilter(v2object.FilterHeaderHomomorphicHash,
hex.EncodeToString(raw1.PayloadHomomorphicHash().Sum()),
hex.EncodeToString(cs.Value()),
objectSDK.MatchStringEqual)
testSelect(t, db, cid, fs, object.AddressOf(raw1))
fs = objectSDK.SearchFilters{}
fs.AddFilter(v2object.FilterHeaderHomomorphicHash,
hex.EncodeToString(raw1.PayloadHomomorphicHash().Sum()),
hex.EncodeToString(cs.Value()),
objectSDK.MatchStringNotEqual)
testSelect(t, db, cid, fs, object.AddressOf(raw2))