Skip to content

Commit

Permalink
fix: wrong way to get blob tx sidecar in `BidRuntime.commitTransactio…
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 authored Apr 22, 2024
1 parent d653cda commit 14023fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions miner/bid_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ func (r *BidRuntime) commitTransaction(chain *core.BlockChain, chainConfig *para
r.env.state.SetTxContext(tx.Hash(), r.env.tcount)

if tx.Type() == types.BlobTxType {
sc = types.NewBlobSidecarFromTx(tx)
if sc == nil {
return errors.New("blob transaction without blobs in miner")
if len(r.env.sidecars) == 0 {
return errors.New("blob transaction without blobs in block body")
}
sc, r.env.sidecars = r.env.sidecars[0], r.env.sidecars[1:]
// 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
// and not during execution. This means core.ApplyTransaction will not return an error if the
Expand Down

0 comments on commit 14023fa

Please sign in to comment.