From 2b066016462abc90bec064509bd151c8c992b9e4 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 3 Feb 2021 17:02:36 +0300 Subject: [PATCH] core: change Oracle request ID endianness --- pkg/core/native/oracle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/native/oracle.go b/pkg/core/native/oracle.go index 2ef566f68..1907b50e7 100644 --- a/pkg/core/native/oracle.go +++ b/pkg/core/native/oracle.go @@ -434,7 +434,7 @@ func (o *Oracle) getRequests(d dao.DAO) (map[uint64]*state.OracleRequest, error) if r.Err != nil { return nil, r.Err } - id := binary.LittleEndian.Uint64([]byte(k)) + id := binary.BigEndian.Uint64([]byte(k)) reqs[id] = req } return reqs, nil @@ -443,7 +443,7 @@ func (o *Oracle) getRequests(d dao.DAO) (map[uint64]*state.OracleRequest, error) func makeRequestKey(id uint64) []byte { k := make([]byte, 9) k[0] = prefixRequest[0] - binary.LittleEndian.PutUint64(k[1:], id) + binary.BigEndian.PutUint64(k[1:], id) return k }