mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
chore: miscellaneous nits (#46)
This commit is contained in:
parent
0eb623e141
commit
f1c9320cce
3 changed files with 7 additions and 13 deletions
|
|
@ -122,16 +122,14 @@ func (b *BlockGen) addTx(bc *BlockChain, vmConfig vm.Config, tx *types.Transacti
|
||||||
var (
|
var (
|
||||||
blockContext = NewEVMBlockContext(b.header, bc, &b.header.Coinbase)
|
blockContext = NewEVMBlockContext(b.header, bc, &b.header.Coinbase)
|
||||||
evm = vm.NewEVM(blockContext, b.statedb, b.cm.config, vmConfig)
|
evm = vm.NewEVM(blockContext, b.statedb, b.cm.config, vmConfig)
|
||||||
gasPool = b.gasPool
|
|
||||||
gasUsed = &b.header.GasUsed
|
gasUsed = &b.header.GasUsed
|
||||||
)
|
)
|
||||||
// Berachain: PoL txs do not count towards block gas.
|
// Berachain: PoL txs do not count towards block gas.
|
||||||
if tx.Type() == types.PoLTxType {
|
if tx.Type() == types.PoLTxType {
|
||||||
gasPool = new(GasPool).AddGas(params.PoLTxGasLimit)
|
|
||||||
gasUsed = new(uint64)
|
gasUsed = new(uint64)
|
||||||
}
|
}
|
||||||
b.statedb.SetTxContext(tx.Hash(), len(b.txs))
|
b.statedb.SetTxContext(tx.Hash(), len(b.txs))
|
||||||
receipt, err := ApplyTransaction(evm, gasPool, b.statedb, b.header, tx, gasUsed)
|
receipt, err := ApplyTransaction(evm, b.gasPool, b.statedb, b.header, tx, gasUsed)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1249,11 +1249,7 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, nil, fmt.Errorf(
|
return nil, 0, nil, fmt.Errorf(
|
||||||
"failed to apply transaction: %v err: %v",
|
"failed to apply transaction: %v err: %v",
|
||||||
args.ToTransaction(
|
args.ToTransaction(types.LegacyTxType, isPrague1, distributorAddress).Hash(),
|
||||||
types.LegacyTxType,
|
|
||||||
b.ChainConfig().IsPrague1(header.Number, header.Time),
|
|
||||||
b.ChainConfig().Berachain.Prague1.PoLDistributorAddress,
|
|
||||||
).Hash(),
|
|
||||||
err,
|
err,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -193,9 +193,9 @@ var (
|
||||||
},
|
},
|
||||||
Berachain: BerachainConfig{
|
Berachain: BerachainConfig{
|
||||||
Prague1: Prague1Config{
|
Prague1: Prague1Config{
|
||||||
Time: newUint64(17446744073709551614),
|
Time: newUint64(17446744073709551614), // TODO: set mainnet timestamp.
|
||||||
MinimumBaseFeeWei: 1000000000, // 1 gwei
|
MinimumBaseFeeWei: 10000000000, // 10 gwei
|
||||||
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -231,8 +231,8 @@ var (
|
||||||
Berachain: BerachainConfig{
|
Berachain: BerachainConfig{
|
||||||
Prague1: Prague1Config{
|
Prague1: Prague1Config{
|
||||||
Time: newUint64(1754496000),
|
Time: newUint64(1754496000),
|
||||||
MinimumBaseFeeWei: 1000000000, // 1 gwei
|
MinimumBaseFeeWei: 10000000000, // 10 gwei
|
||||||
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
BaseFeeChangeDenominator: 48, // 6x increase from the default
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue