smartcontract: fix uint160 marshalling in smartcontract.Parameter
There's a bug after #785: smartcontract.Parameter of type hash160 should be marshalled in LE (as default marshaller for uint160 does) instead of BE, so fixed.
This commit is contained in:
parent
12a9a6b9ae
commit
5a62eb923e
2 changed files with 6 additions and 8 deletions
|
@ -95,8 +95,8 @@ var marshalJSONTestCases = []struct {
|
|||
input: Parameter{
|
||||
Type: Hash160Type,
|
||||
Value: util.Uint160{
|
||||
0x0b, 0xcd, 0x29, 0x78, 0x63, 0x4d, 0x96, 0x1c, 0x24, 0xf5,
|
||||
0xae, 0xa0, 0x80, 0x22, 0x97, 0xff, 0x12, 0x87, 0x24, 0xd6,
|
||||
0xd6, 0x24, 0x87, 0x12, 0xff, 0x97, 0x22, 0x80, 0xa0, 0xae,
|
||||
0xf5, 0x24, 0x1c, 0x96, 0x4d, 0x63, 0x78, 0x29, 0xcd, 0xb,
|
||||
},
|
||||
},
|
||||
result: `{"type":"Hash160","value":"0x0bcd2978634d961c24f5aea0802297ff128724d6"}`,
|
||||
|
@ -188,8 +188,8 @@ var unmarshalJSONTestCases = []struct {
|
|||
result: Parameter{
|
||||
Type: Hash160Type,
|
||||
Value: util.Uint160{
|
||||
0x0b, 0xcd, 0x29, 0x78, 0x63, 0x4d, 0x96, 0x1c, 0x24, 0xf5,
|
||||
0xae, 0xa0, 0x80, 0x22, 0x97, 0xff, 0x12, 0x87, 0x24, 0xd6,
|
||||
0xd6, 0x24, 0x87, 0x12, 0xff, 0x97, 0x22, 0x80, 0xa0, 0xae,
|
||||
0xf5, 0x24, 0x1c, 0x96, 0x4d, 0x63, 0x78, 0x29, 0xcd, 0xb,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue