forked from TrueCloudLab/neoneo-go
rpc: refactor code of NewAccountState function
Simplified reversing of scriptHash
This commit is contained in:
parent
f310145612
commit
b8715ddf11
1 changed files with 1 additions and 4 deletions
|
@ -45,10 +45,7 @@ func NewAccountState(a *state.Account) AccountState {
|
||||||
sort.Sort(balances)
|
sort.Sort(balances)
|
||||||
|
|
||||||
// reverse scriptHash to be consistent with other client
|
// reverse scriptHash to be consistent with other client
|
||||||
scriptHash, err := util.Uint160DecodeBytesBE(a.ScriptHash.BytesLE())
|
scriptHash := a.ScriptHash.Reverse()
|
||||||
if err != nil {
|
|
||||||
scriptHash = a.ScriptHash
|
|
||||||
}
|
|
||||||
|
|
||||||
return AccountState{
|
return AccountState{
|
||||||
Version: a.Version,
|
Version: a.Version,
|
||||||
|
|
Loading…
Reference in a new issue