Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
HAOYUatHZ committed Apr 6, 2023
1 parent f91228c commit 7708d06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func Transition(ctx *cli.Context) error {
}
// Sanity check, to not `panic` in state_transition
if chainConfig.IsLondon(big.NewInt(int64(prestate.Env.Number))) {
if prestate.Env.BaseFee == nil && chainConfig.EnableEIP2718 && chainConfig.EnableEIP1559 {
if prestate.Env.BaseFee == nil && chainConfig.Scroll.BaseFeeEnabled() {
return NewError(ErrorConfig, errors.New("EIP-1559 config but missing 'currentBaseFee' in env section"))
}
}
Expand Down
6 changes: 3 additions & 3 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ func TestFeeVault(t *testing.T) {
}

// Ensure that the fee vault received all tx fees
actual = state.GetBalance(*params.TestChainConfig.FeeVaultAddress)
actual = state.GetBalance(*params.TestChainConfig.Scroll.FeeVaultAddress)
expected = new(big.Int).SetUint64(block.GasUsed() * block.Transactions()[0].GasTipCap().Uint64())

if actual.Cmp(expected) != 0 {
Expand All @@ -3182,8 +3182,8 @@ func TestFeeVault(t *testing.T) {
func TestTransactionCountLimit(t *testing.T) {
// Create config that allows at most 1 transaction per block
config := params.TestChainConfig
config.MaxTxPerBlock = new(int)
*config.MaxTxPerBlock = 1
config.Scroll.MaxTxPerBlock = new(int)
*config.Scroll.MaxTxPerBlock = 1

var (
engine = ethash.NewFaker()
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/api_blocktrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func checkStructLogs(t *testing.T, expect []*txTraceResult, actual []*types.Exec
func checkCoinbase(t *testing.T, b *testBackend, wrapper *types.AccountWrapper) {
var coinbase common.Address
if b.chainConfig.Scroll.L1FeeEnabled() {
coinbase = *b.chainConfig.FeeVaultAddress
coinbase = *b.chainConfig.Scroll.FeeVaultAddress
} else {
header, err := b.HeaderByNumber(context.Background(), 1)
assert.NoError(t, err)
Expand Down

0 comments on commit 7708d06

Please sign in to comment.