Skip to content

Commit

Permalink
feat: force check that Euler height cannot be a multiple of 200, fix …
Browse files Browse the repository at this point in the history
…getCurrentValidators, raise SystemTxsGas after Euler fork
  • Loading branch information
goth committed Apr 29, 2022
1 parent 3c560a7 commit 746d178
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions eth/catalyst/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func generateTestChainWithFork(n int, fork int) (*core.Genesis, []*types.Block,
NielsBlock: big.NewInt(0),
MirrorSyncBlock: big.NewInt(0),
BrunoBlock: big.NewInt(0),
EulerBlock: big.NewInt(0),

Ethash: new(params.EthashConfig),
}
Expand Down
7 changes: 6 additions & 1 deletion miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,12 @@ func (w *worker) commitTransactions(txs *types.TransactionsByPriceAndNonce, coin

if w.current.gasPool == nil {
w.current.gasPool = new(core.GasPool).AddGas(w.current.header.GasLimit)
w.current.gasPool.SubGas(params.SystemTxsGas)
if w.chain.Config().IsEuler(w.current.header.Number) {
w.current.gasPool.SubGas(params.SystemTxsGas * 3)
} else {
w.current.gasPool.SubGas(params.SystemTxsGas)
}

}

var coalescedLogs []*types.Log
Expand Down

0 comments on commit 746d178

Please sign in to comment.