aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/receipt.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/types/receipt.go')
-rw-r--r--core/types/receipt.go27
1 files changed, 13 insertions, 14 deletions
diff --git a/core/types/receipt.go b/core/types/receipt.go
index bc3c996b4..208d54aaa 100644
--- a/core/types/receipt.go
+++ b/core/types/receipt.go
@@ -20,7 +20,6 @@ import (
"bytes"
"fmt"
"io"
- "math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
@@ -45,46 +44,46 @@ const (
// Receipt represents the results of a transaction.
type Receipt struct {
// Consensus fields
- PostState []byte `json:"root"`
- Status uint `json:"status"`
- CumulativeGasUsed *big.Int `json:"cumulativeGasUsed" gencodec:"required"`
- Bloom Bloom `json:"logsBloom" gencodec:"required"`
- Logs []*Log `json:"logs" gencodec:"required"`
+ PostState []byte `json:"root"`
+ Status uint `json:"status"`
+ CumulativeGasUsed uint64 `json:"cumulativeGasUsed" gencodec:"required"`
+ Bloom Bloom `json:"logsBloom" gencodec:"required"`
+ Logs []*Log `json:"logs" gencodec:"required"`
// Implementation fields (don't reorder!)
TxHash common.Hash `json:"transactionHash" gencodec:"required"`
ContractAddress common.Address `json:"contractAddress"`
- GasUsed *big.Int `json:"gasUsed" gencodec:"required"`
+ GasUsed uint64 `json:"gasUsed" gencodec:"required"`
}
type receiptMarshaling struct {
PostState hexutil.Bytes
Status hexutil.Uint
- CumulativeGasUsed *hexutil.Big
- GasUsed *hexutil.Big
+ CumulativeGasUsed hexutil.Uint64
+ GasUsed hexutil.Uint64
}
// receiptRLP is the consensus encoding of a receipt.
type receiptRLP struct {
PostStateOrStatus []byte
- CumulativeGasUsed *big.Int
+ CumulativeGasUsed uint64
Bloom Bloom
Logs []*Log
}
type receiptStorageRLP struct {
PostStateOrStatus []byte
- CumulativeGasUsed *big.Int
+ CumulativeGasUsed uint64
Bloom Bloom
TxHash common.Hash
ContractAddress common.Address
Logs []*LogForStorage
- GasUsed *big.Int
+ GasUsed uint64
}
// NewReceipt creates a barebone transaction receipt, copying the init fields.
-func NewReceipt(root []byte, failed bool, cumulativeGasUsed *big.Int) *Receipt {
- r := &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: new(big.Int).Set(cumulativeGasUsed)}
+func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt {
+ r := &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: cumulativeGasUsed}
if failed {
r.Status = ReceiptStatusFailed
} else {