Add Error fields to RPC responses (#84)
Also add `Script` field to `InvokeResult` structure.
This commit is contained in:
parent
1d9045877c
commit
f69451d36d
2 changed files with 5 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
0.44.3
|
0.44.4
|
||||||
|
|
|
@ -2,7 +2,8 @@ package rpc
|
||||||
|
|
||||||
type InvokeScriptResponse struct {
|
type InvokeScriptResponse struct {
|
||||||
responseHeader
|
responseHeader
|
||||||
Result *InvokeResult
|
Error *Error `json:"error,omitempty"`
|
||||||
|
Result *InvokeResult `json:"result,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// InvokeResult represents the outcome of a script that is
|
// InvokeResult represents the outcome of a script that is
|
||||||
|
@ -10,6 +11,7 @@ type InvokeScriptResponse struct {
|
||||||
type InvokeResult struct {
|
type InvokeResult struct {
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
GasConsumed string `json:"gas_consumed"`
|
GasConsumed string `json:"gas_consumed"`
|
||||||
|
Script string `json:"script"`
|
||||||
Stack []*StackParam
|
Stack []*StackParam
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,5 +70,6 @@ type responseHeader struct {
|
||||||
|
|
||||||
type response struct {
|
type response struct {
|
||||||
responseHeader
|
responseHeader
|
||||||
|
Error *Error `json:"error"`
|
||||||
Result interface{} `json:"result"`
|
Result interface{} `json:"result"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue