[#140] sdk: Refactor reference types

Refactor v2-compatible reference types to be wrappers over corresponding
types from v2.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-10 12:57:29 +03:00 committed by Stanislav Bogatyrev
parent 2026473733
commit 524280a5e8
10 changed files with 73 additions and 215 deletions

View file

@ -9,7 +9,7 @@ import (
)
func TestIDV2_0(t *testing.T) {
cid := new(ID)
cid := NewID()
checksum := [sha256.Size]byte{}
@ -20,8 +20,5 @@ func TestIDV2_0(t *testing.T) {
cidV2 := cid.ToV2()
cid2, err := IDFromV2(cidV2)
require.NoError(t, err)
require.Equal(t, cid, cid2)
require.Equal(t, checksum[:], cidV2.GetValue())
}