From 054e60c0cf1a34a5252fc1ff22669429a67a6b69 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 16 Nov 2020 19:09:34 +0300 Subject: [PATCH] core: remove NodeList from Oracle storage The reference implementation does not store NodeList. This commit fixes state difference for genesis block. --- pkg/core/native/oracle.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/core/native/oracle.go b/pkg/core/native/oracle.go index 599c3dc99..dc3e57fed 100644 --- a/pkg/core/native/oracle.go +++ b/pkg/core/native/oracle.go @@ -74,7 +74,6 @@ func init() { var ( prefixIDList = []byte{6} prefixRequest = []byte{7} - prefixNodeList = []byte{8} prefixRequestID = []byte{9} ) @@ -206,11 +205,7 @@ func (o *Oracle) Metadata() *interop.ContractMD { // Initialize initializes Oracle contract. func (o *Oracle) Initialize(ic *interop.Context) error { - si := &state.StorageItem{Value: NodeList{}.Bytes()} - if err := ic.DAO.PutStorageItem(o.ContractID, prefixNodeList, si); err != nil { - return err - } - si = &state.StorageItem{Value: make([]byte, 8)} // uint64(0) LE + si := &state.StorageItem{Value: make([]byte, 8)} // uint64(0) LE return ic.DAO.PutStorageItem(o.ContractID, prefixRequestID, si) }