forked from TrueCloudLab/neoneo-go
Merge pull request #754 from nspcc-dev/bug/getapplicationlog_rpc
rpc: bug with empty stack marshalling in getapplicationlog
This commit is contained in:
commit
ec2a7324a6
1 changed files with 7 additions and 1 deletions
|
@ -46,12 +46,18 @@ func NewApplicationLog(appExecRes *state.AppExecResult, scriptHash util.Uint160)
|
||||||
|
|
||||||
triggerString := appExecRes.Trigger.String()
|
triggerString := appExecRes.Trigger.String()
|
||||||
|
|
||||||
|
var rawStack json.RawMessage
|
||||||
|
if len(appExecRes.Stack) != 0 {
|
||||||
|
rawStack = json.RawMessage(appExecRes.Stack)
|
||||||
|
} else {
|
||||||
|
rawStack = json.RawMessage("[]")
|
||||||
|
}
|
||||||
executions := []Execution{{
|
executions := []Execution{{
|
||||||
Trigger: triggerString,
|
Trigger: triggerString,
|
||||||
ScriptHash: scriptHash,
|
ScriptHash: scriptHash,
|
||||||
VMState: appExecRes.VMState,
|
VMState: appExecRes.VMState,
|
||||||
GasConsumed: appExecRes.GasConsumed,
|
GasConsumed: appExecRes.GasConsumed,
|
||||||
Stack: json.RawMessage(appExecRes.Stack),
|
Stack: rawStack,
|
||||||
Events: events,
|
Events: events,
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue