diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-10-02 16:42:08 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-10-02 19:04:22 +0800 |
commit | 7e9e3a134b9607209def42279db081973b5e0ac2 (patch) | |
tree | 937622958d23a10dc95cb41682305b1e075df833 /core/types/gen_receipt_json.go | |
parent | a31835c8b4086582879a4e7a48e4bdb5e4dccc3d (diff) | |
download | dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar.gz dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar.bz2 dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar.lz dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar.xz dexon-7e9e3a134b9607209def42279db081973b5e0ac2.tar.zst dexon-7e9e3a134b9607209def42279db081973b5e0ac2.zip |
core/types, internal: swap Receipt.Failed to Status
Diffstat (limited to 'core/types/gen_receipt_json.go')
-rw-r--r-- | core/types/gen_receipt_json.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/types/gen_receipt_json.go b/core/types/gen_receipt_json.go index 1e6880c22..b95d99c95 100644 --- a/core/types/gen_receipt_json.go +++ b/core/types/gen_receipt_json.go @@ -14,7 +14,7 @@ import ( func (r Receipt) MarshalJSON() ([]byte, error) { type Receipt struct { PostState hexutil.Bytes `json:"root"` - Failed bool `json:"failed"` + Status hexutil.Uint `json:"status"` CumulativeGasUsed *hexutil.Big `json:"cumulativeGasUsed" gencodec:"required"` Bloom Bloom `json:"logsBloom" gencodec:"required"` Logs []*Log `json:"logs" gencodec:"required"` @@ -24,7 +24,7 @@ func (r Receipt) MarshalJSON() ([]byte, error) { } var enc Receipt enc.PostState = r.PostState - enc.Failed = r.Failed + enc.Status = hexutil.Uint(r.Status) enc.CumulativeGasUsed = (*hexutil.Big)(r.CumulativeGasUsed) enc.Bloom = r.Bloom enc.Logs = r.Logs @@ -37,7 +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"` + Status *hexutil.Uint `json:"status"` CumulativeGasUsed *hexutil.Big `json:"cumulativeGasUsed" gencodec:"required"` Bloom *Bloom `json:"logsBloom" gencodec:"required"` Logs []*Log `json:"logs" gencodec:"required"` @@ -52,8 +52,8 @@ 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.Status != nil { + r.Status = uint(*dec.Status) } if dec.CumulativeGasUsed == nil { return errors.New("missing required field 'cumulativeGasUsed' for Receipt") |