Merge pull request #1548 from nspcc-dev/core/oracle_storage_fix

core: remove NodeList from Oracle storage
This commit is contained in:
Roman Khimov 2020-11-16 21:21:22 +03:00 committed by GitHub
commit 82e5adb970
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}