aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/gen_receipt_json.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/types/gen_receipt_json.go')
-rw-r--r--core/types/gen_receipt_json.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/types/gen_receipt_json.go b/core/types/gen_receipt_json.go
index eb2e5d42b..1e6880c22 100644
--- a/core/types/gen_receipt_json.go
+++ b/core/types/gen_receipt_json.go
@@ -14,6 +14,7 @@ import (
func (r Receipt) MarshalJSON() ([]byte, error) {
type Receipt struct {
PostState hexutil.Bytes `json:"root"`
+ Failed bool `json:"failed"`
CumulativeGasUsed *hexutil.Big `json:"cumulativeGasUsed" gencodec:"required"`
Bloom Bloom `json:"logsBloom" gencodec:"required"`
Logs []*Log `json:"logs" gencodec:"required"`
@@ -23,6 +24,7 @@ func (r Receipt) MarshalJSON() ([]byte, error) {
}
var enc Receipt
enc.PostState = r.PostState
+ enc.Failed = r.Failed
enc.CumulativeGasUsed = (*hexutil.Big)(r.CumulativeGasUsed)
enc.Bloom = r.Bloom
enc.Logs = r.Logs
@@ -35,6 +37,7 @@ func (r Receipt) MarshalJSON() ([]byte, error) {
func (r *Receipt) UnmarshalJSON(input []byte) error {
type Receipt struct {
PostState hexutil.Bytes `json:"root"`
+ Failed *bool `json:"failed"`
CumulativeGasUsed *hexutil.Big `json:"cumulativeGasUsed" gencodec:"required"`
Bloom *Bloom `json:"logsBloom" gencodec:"required"`
Logs []*Log `json:"logs" gencodec:"required"`
@@ -49,6 +52,9 @@ func (r *Receipt) UnmarshalJSON(input []byte) error {
if dec.PostState != nil {
r.PostState = dec.PostState
}
+ if dec.Failed != nil {
+ r.Failed = *dec.Failed
+ }
if dec.CumulativeGasUsed == nil {
return errors.New("missing required field 'cumulativeGasUsed' for Receipt")
}