Set version for mapstate
License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
parent
6d77954327
commit
46801aa436
|
@ -45,6 +45,7 @@ func NewMapState() state.State {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
dsSt.SetVersion(Version)
|
||||||
return &MapState{dsSt}
|
return &MapState{dsSt}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ func TestMarshalUnmarshal(t *testing.T) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if ms.GetVersion() != ms2.GetVersion() {
|
if ms.GetVersion() != ms2.GetVersion() {
|
||||||
t.Fatal(err)
|
t.Fatal("version mismatch", ms.GetVersion(), ms2.GetVersion())
|
||||||
}
|
}
|
||||||
get, ok := ms2.Get(ctx, c.Cid)
|
get, ok := ms2.Get(ctx, c.Cid)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user