Skip to content

Commit

Permalink
eth,miner: return STATUS_INVALID when failing to process forced trans…
Browse files Browse the repository at this point in the history
…actions in request (ethereum#40)
  • Loading branch information
protolambda committed Nov 4, 2022
1 parent ed53d51 commit e4c4c3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eth/catalyst/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update beacon.ForkchoiceStateV1, pa
payload, err := api.eth.Miner().BuildPayload(args)
if err != nil {
log.Error("Failed to build payload", "err", err)
return valid(nil), beacon.InvalidPayloadAttributes.With(err)
return beacon.STATUS_INVALID, beacon.InvalidPayloadAttributes.With(err)
}
id := computePayloadId(update.HeadBlockHash, payloadAttributes)
api.localBlocks.put(id, payload)
Expand Down
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ func (w *worker) generateWork(genParams *generateParams) (*types.Block, *big.Int
work.state.Prepare(tx.Hash(), work.tcount)
_, err := w.commitTransaction(work, tx)
if err != nil {
return nil, nil, fmt.Errorf("failed to force-include tx: %s type: %d sender: %s nonce: %d", tx.Hash(), tx.Type(), from, tx.Nonce())
return nil, nil, fmt.Errorf("failed to force-include tx: %s type: %d sender: %s nonce: %d, err: %w", tx.Hash(), tx.Type(), from, tx.Nonce(), err)
}
work.tcount++
}
Expand Down

0 comments on commit e4c4c3e

Please sign in to comment.