diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 382cf96d75..64ee3fcd9a 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -1398,7 +1398,7 @@ func (p *BlobPool) AvailableBlobs(vhashes []common.Hash) int { } // convertSidecar converts the legacy sidecar in the submitted transactions -// if osaka fork has been activated. +// if Osaka fork has been activated. func (p *BlobPool) convertSidecar(txs []*types.Transaction) ([]*types.Transaction, []error) { head := p.chain.CurrentBlock() if !p.chain.Config().IsOsaka(head.Number, head.Time) { diff --git a/core/txpool/blobpool/blobpool_test.go b/core/txpool/blobpool/blobpool_test.go index cc7dda6c03..51ab27eb01 100644 --- a/core/txpool/blobpool/blobpool_test.go +++ b/core/txpool/blobpool/blobpool_test.go @@ -1705,25 +1705,8 @@ func TestAddLegacyBlobTx(t *testing.T) { statedb.AddBalance(addr2, uint256.NewInt(1_000_000_000), tracing.BalanceChangeUnspecified) statedb.Commit(0, true, false) - // Make Prague-enabled custom chain config. - cancunTime := uint64(0) - pragueTime := uint64(0) - osakaTime := uint64(0) - config := ¶ms.ChainConfig{ - ChainID: big.NewInt(1), - LondonBlock: big.NewInt(0), - BerlinBlock: big.NewInt(0), - CancunTime: &cancunTime, - PragueTime: &pragueTime, - OsakaTime: &osakaTime, - BlobScheduleConfig: ¶ms.BlobScheduleConfig{ - Cancun: params.DefaultCancunBlobConfig, - Prague: params.DefaultPragueBlobConfig, - Osaka: params.DefaultOsakaBlobConfig, - }, - } chain := &testBlockChain{ - config: config, + config: params.MergedTestChainConfig, basefee: uint256.NewInt(1050), blobfee: uint256.NewInt(105), statedb: statedb, diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index c75cca6852..693edfbd78 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1521,9 +1521,8 @@ func (api *TransactionAPI) FillTransaction(ctx context.Context, args Transaction // Set some sanity defaults and terminate on failure sidecarVersion := types.BlobSidecarVersion0 if len(args.Blobs) > 0 { - chainHead := api.b.CurrentHeader() - isOsaka := api.b.ChainConfig().IsOsaka(chainHead.Number, chainHead.Time) - if isOsaka { + h := api.b.CurrentHeader() + if api.b.ChainConfig().IsOsaka(h.Number, h.Time) { sidecarVersion = types.BlobSidecarVersion1 } } @@ -1599,9 +1598,8 @@ func (api *TransactionAPI) SignTransaction(ctx context.Context, args Transaction } sidecarVersion := types.BlobSidecarVersion0 if len(args.Blobs) > 0 { - chainHead := api.b.CurrentHeader() - isOsaka := api.b.ChainConfig().IsOsaka(chainHead.Number, chainHead.Time) - if isOsaka { + h := api.b.CurrentHeader() + if api.b.ChainConfig().IsOsaka(h.Number, h.Time) { sidecarVersion = types.BlobSidecarVersion1 } } diff --git a/internal/ethapi/transaction_args.go b/internal/ethapi/transaction_args.go index d671d69a2c..f80ef6d080 100644 --- a/internal/ethapi/transaction_args.go +++ b/internal/ethapi/transaction_args.go @@ -162,7 +162,7 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend, config return err } args.Gas = &estimated - log.Trace("Estimate gas usage automatically", "gas", args.Gas) + log.Trace("Estimated gas usage automatically", "gas", args.Gas) } // If chain id is provided, ensure it matches the local chain id. Otherwise, set the local