dao: prevent double serialization of StorageItems

Converting to MPT value serializes the StorageItem, so it makes no sense doing
it again.
This commit is contained in:
Roman Khimov 2020-06-04 17:18:15 +03:00
parent f77c239296
commit 685d3eb870

View file

@ -475,7 +475,7 @@ func (dao *Simple) PutStorageItem(scripthash util.Uint160, key []byte, si *state
if err := dao.MPT.Put(k, v); err != nil && err != mpt.ErrNotFound {
return err
}
return dao.Put(si, stKey)
return dao.Store.Put(stKey, v[1:])
}
// DeleteStorageItem drops storage item for the given script with the