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)
|
||||
|
||||
// reverse scriptHash to be consistent with other client
|
||||
scriptHash, err := util.Uint160DecodeBytesBE(a.ScriptHash.BytesLE())
|
||||
if err != nil {
|
||||
scriptHash = a.ScriptHash
|
||||
}
|
||||
scriptHash := a.ScriptHash.Reverse()
|
||||
|
||||
return AccountState{
|
||||
Version: a.Version,
|
||||
|
|
Loading…
Reference in a new issue