mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
throw-evm-err-for-pre-exec
This commit is contained in:
parent
c6f166ff6e
commit
97516f7ffd
3 changed files with 3 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ func applyTransaction(msg types.Message, config *params.ChainConfig, bc ChainCon
|
|||
|
||||
// Create a new receipt for the transaction, storing the intermediate root and gas used
|
||||
// by the tx.
|
||||
receipt := &types.Receipt{Type: tx.Type(), PostState: root, CumulativeGasUsed: *usedGas}
|
||||
receipt := &types.Receipt{Type: tx.Type(), PostState: root, CumulativeGasUsed: *usedGas, Err: result.Err}
|
||||
if result.Failed() {
|
||||
receipt.Status = types.ReceiptStatusFailed
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ type Receipt struct {
|
|||
BlockHash common.Hash `json:"blockHash,omitempty"`
|
||||
BlockNumber *big.Int `json:"blockNumber,omitempty"`
|
||||
TransactionIndex uint `json:"transactionIndex"`
|
||||
Err error `json:"error"`
|
||||
}
|
||||
|
||||
type receiptMarshaling struct {
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ func (api *PreExecAPI) GetLogs(ctx context.Context, origin *PreExecTx) (*types.R
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return receipt, nil
|
||||
return receipt, receipt.Err
|
||||
}
|
||||
|
||||
// TraceTransaction tracing pre-exec transaction object.
|
||||
|
|
|
|||
Loading…
Reference in a new issue