Revert "Add status field for pre-byzantium blocks."

This reverts commit 04a0f9a751.
This commit is contained in:
Arijit Das
2021-09-15 17:14:25 +05:30
parent 7f0c8fb2a1
commit ed4171a1ab
14 changed files with 121 additions and 260 deletions
+2 -8
View File
@@ -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{}
}