From 6103da8d10fab2146443ab928f1d32cc9dcbaee2 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 23 Jul 2021 12:41:09 +0300 Subject: [PATCH] context: read item key in LE Hi, neo-project/neo#938. --- pkg/smartcontract/context/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/smartcontract/context/context.go b/pkg/smartcontract/context/context.go index d597e13ec..fea22c495 100644 --- a/pkg/smartcontract/context/context.go +++ b/pkg/smartcontract/context/context.go @@ -168,7 +168,7 @@ func (c ParameterContext) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - items["0x"+u.StringBE()] = data + items["0x"+u.StringLE()] = data } pc := ¶mContext{ Type: c.Type, @@ -200,7 +200,7 @@ func (c *ParameterContext) UnmarshalJSON(data []byte) error { } items := make(map[util.Uint160]*Item, len(pc.Items)) for h := range pc.Items { - u, err := util.Uint160DecodeStringBE(strings.TrimPrefix(h, "0x")) + u, err := util.Uint160DecodeStringLE(strings.TrimPrefix(h, "0x")) if err != nil { return err }