Merge pull request #758 from nspcc-dev/rpc-fix-hash160

rpc: fix invocations of contracts using hash160
This commit is contained in:
Roman Khimov 2020-03-13 16:50:31 +03:00 committed by GitHub
commit ba1c3bfccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,9 @@ func (p Param) GetUint160FromHex() (util.Uint160, error) {
if err != nil {
return util.Uint160{}, err
}
if len(s) == 2*util.Uint160Size+2 && s[0] == '0' && s[1] == 'x' {
s = s[2:]
}
return util.Uint160DecodeStringLE(s)
}