Set version for mapstate

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
This commit is contained in:
Hector Sanjuan 2019-02-19 21:19:43 +00:00
parent 6d77954327
commit 46801aa436
2 changed files with 2 additions and 1 deletions

View File

@ -45,6 +45,7 @@ func NewMapState() state.State {
if err != nil {
panic(err)
}
dsSt.SetVersion(Version)
return &MapState{dsSt}
}

View File

@ -107,7 +107,7 @@ func TestMarshalUnmarshal(t *testing.T) {
t.Fatal(err)
}
if ms.GetVersion() != ms2.GetVersion() {
t.Fatal(err)
t.Fatal("version mismatch", ms.GetVersion(), ms2.GetVersion())
}
get, ok := ms2.Get(ctx, c.Cid)
if !ok {