core: change Oracle request ID endianness
This commit is contained in:
parent
12f7111ca8
commit
2b06601646
1 changed files with 2 additions and 2 deletions
|
@ -434,7 +434,7 @@ func (o *Oracle) getRequests(d dao.DAO) (map[uint64]*state.OracleRequest, error)
|
||||||
if r.Err != nil {
|
if r.Err != nil {
|
||||||
return nil, r.Err
|
return nil, r.Err
|
||||||
}
|
}
|
||||||
id := binary.LittleEndian.Uint64([]byte(k))
|
id := binary.BigEndian.Uint64([]byte(k))
|
||||||
reqs[id] = req
|
reqs[id] = req
|
||||||
}
|
}
|
||||||
return reqs, nil
|
return reqs, nil
|
||||||
|
@ -443,7 +443,7 @@ func (o *Oracle) getRequests(d dao.DAO) (map[uint64]*state.OracleRequest, error)
|
||||||
func makeRequestKey(id uint64) []byte {
|
func makeRequestKey(id uint64) []byte {
|
||||||
k := make([]byte, 9)
|
k := make([]byte, 9)
|
||||||
k[0] = prefixRequest[0]
|
k[0] = prefixRequest[0]
|
||||||
binary.LittleEndian.PutUint64(k[1:], id)
|
binary.BigEndian.PutUint64(k[1:], id)
|
||||||
return k
|
return k
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue