forked from TrueCloudLab/neoneo-go
cli/query: use application log for vm state
C# node doesn't return VMState data, so it leads to "false" being printed for successful transactions.
This commit is contained in:
parent
7d6898677b
commit
0415e6dc10
1 changed files with 5 additions and 1 deletions
|
@ -86,7 +86,11 @@ func dumpApplicationLog(ctx *cli.Context, res *result.ApplicationLog, tx *result
|
||||||
_, _ = tw.Write([]byte("ValidUntil:\t" + strconv.FormatUint(uint64(tx.ValidUntilBlock), 10) + "\n"))
|
_, _ = tw.Write([]byte("ValidUntil:\t" + strconv.FormatUint(uint64(tx.ValidUntilBlock), 10) + "\n"))
|
||||||
} else {
|
} else {
|
||||||
_, _ = tw.Write([]byte("BlockHash:\t" + tx.Blockhash.StringLE() + "\n"))
|
_, _ = tw.Write([]byte("BlockHash:\t" + tx.Blockhash.StringLE() + "\n"))
|
||||||
_, _ = tw.Write([]byte(fmt.Sprintf("Success:\t%t\n", tx.VMState == vm.HaltState.String())))
|
if len(res.Executions) != 1 {
|
||||||
|
_, _ = tw.Write([]byte("Success:\tunknown (no execution data)\n"))
|
||||||
|
} else {
|
||||||
|
_, _ = tw.Write([]byte(fmt.Sprintf("Success:\t%t\n", res.Executions[0].VMState == vm.HaltState)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if verbose {
|
if verbose {
|
||||||
for _, sig := range tx.Signers {
|
for _, sig := range tx.Signers {
|
||||||
|
|
Loading…
Reference in a new issue