Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
remove panic from worker.go
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Mar 11, 2024
1 parent e355bb9 commit aa132a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion miner/environment_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (envDiff *environmentDiff) applyToBaseEnv() {
func (envDiff *environmentDiff) commitBlobTx(tx *types.Transaction, chData chainData) (*types.Receipt, int, error) {
sc := tx.BlobTxSidecar()
if sc == nil {
panic("blob transaction without blobs in miner")
return nil, popTx, errors.New("blob transaction without blobs in miner")
}
// Checking against blob gas limit: It's kind of ugly to perform this check here, but there
// isn't really a better place right now. The blob gas limit is checked at block validation time
Expand Down
2 changes: 1 addition & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ func (w *worker) commitTransaction(env *environment, tx *types.Transaction) ([]*
func (w *worker) commitBlobTransaction(env *environment, tx *types.Transaction) ([]*types.Log, error) {
sc := tx.BlobTxSidecar()
if sc == nil {
panic("blob transaction without blobs in miner")
return nil, errors.New("blob transaction without blobs in miner")
}
// Checking against blob gas limit: It's kind of ugly to perform this check here, but there
// isn't really a better place right now. The blob gas limit is checked at block validation time
Expand Down

0 comments on commit aa132a4

Please sign in to comment.