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()
|
||||
|
||||
var rawStack json.RawMessage
|
||||
if len(appExecRes.Stack) != 0 {
|
||||
rawStack = json.RawMessage(appExecRes.Stack)
|
||||
} else {
|
||||
rawStack = json.RawMessage("[]")
|
||||
}
|
||||
executions := []Execution{{
|
||||
Trigger: triggerString,
|
||||
ScriptHash: scriptHash,
|
||||
VMState: appExecRes.VMState,
|
||||
GasConsumed: appExecRes.GasConsumed,
|
||||
Stack: json.RawMessage(appExecRes.Stack),
|
||||
Stack: rawStack,
|
||||
Events: events,
|
||||
}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue