forked from cerc-io/ipld-eth-server
Revert "Add status field for pre-byzantium blocks."
This reverts commit 04a0f9a751.
This commit is contained in:
+2
-8
@@ -524,18 +524,12 @@ func (pea *PublicEthAPI) localGetTransactionReceipt(ctx context.Context, hash co
|
||||
"logsBloom": receipt.Bloom,
|
||||
}
|
||||
|
||||
if blockNumber <= pea.B.Config.ChainConfig.ByzantiumBlock.Uint64() {
|
||||
if receipt.GasUsed > tx.Gas() {
|
||||
fields["status"] = hexutil.Uint(types.ReceiptStatusFailed)
|
||||
} else {
|
||||
fields["status"] = hexutil.Uint(types.ReceiptStatusSuccessful)
|
||||
}
|
||||
} else if len(receipt.PostState) > 0 {
|
||||
// Assign receipt status or post state.
|
||||
if len(receipt.PostState) > 0 {
|
||||
fields["root"] = hexutil.Bytes(receipt.PostState)
|
||||
} else {
|
||||
fields["status"] = hexutil.Uint(receipt.Status)
|
||||
}
|
||||
|
||||
if receipt.Logs == nil {
|
||||
fields["logs"] = []*types.Log{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user