From 685d3eb8706c6f3eedf87a291af0cc8a05983fbb Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 4 Jun 2020 17:18:15 +0300 Subject: [PATCH] dao: prevent double serialization of StorageItems Converting to MPT value serializes the StorageItem, so it makes no sense doing it again. --- pkg/core/dao/dao.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/dao/dao.go b/pkg/core/dao/dao.go index b6fb6023b..a1865517c 100644 --- a/pkg/core/dao/dao.go +++ b/pkg/core/dao/dao.go @@ -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