aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-10-02 16:42:08 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-10-02 19:04:22 +0800
commit7e9e3a134b9607209def42279db081973b5e0ac2 (patch)
tree937622958d23a10dc95cb41682305b1e075df833 /internal/ethapi
parenta31835c8b4086582879a4e7a48e4bdb5e4dccc3d (diff)
downloaddexon-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 'internal/ethapi')
-rw-r--r--internal/ethapi/api.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index a7cb08466..ab8478929 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -44,10 +44,8 @@ import (
)
const (
- defaultGas = 90000
- defaultGasPrice = 50 * params.Shannon
- receiptStatusSuccessful = 1
- receiptStatusFailed = 0
+ defaultGas = 90000
+ defaultGasPrice = 50 * params.Shannon
)
// PublicEthereumAPI provides an API to access Ethereum related information.
@@ -1010,10 +1008,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(hash common.Hash) (map[
if len(receipt.PostState) > 0 {
fields["root"] = hexutil.Bytes(receipt.PostState)
} else {
- fields["status"] = hexutil.Uint(receiptStatusSuccessful)
- if receipt.Failed {
- fields["status"] = hexutil.Uint(receiptStatusFailed)
- }
+ fields["status"] = hexutil.Uint(receipt.Status)
}
if receipt.Logs == nil {
fields["logs"] = [][]*types.Log{}