Skip to content

Commit

Permalink
replay fix for coinbase change
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesign committed Nov 16, 2024
1 parent 73f0daa commit 9e2925f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/replayer/blocks_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ type blockSnapshot struct {
var _ evmTypes.BlockSnapshot = (*blockSnapshot)(nil)

func (bs *blockSnapshot) BlockContext() (evmTypes.BlockContext, error) {
miner := evmTypes.CoinbaseAddress
if bs.chainID == flowGo.Testnet && bs.block.Height < 1385490 {
miner = evmTypes.Address{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}
return evmTypes.BlockContext{
ChainID: evmTypes.EVMChainIDFromFlowChainID(bs.chainID),
BlockNumber: bs.block.Height,
BlockTimestamp: bs.block.Timestamp,
DirectCallBaseGasUsage: evmTypes.DefaultDirectCallBaseGasUsage,
DirectCallGasPrice: evmTypes.DefaultDirectCallGasPrice,
GasFeeCollector: evmTypes.CoinbaseAddress,
GasFeeCollector: miner,
GetHashFunc: func(n uint64) gethCommon.Hash {
// For block heights greater than or equal to the current,
// return an empty block hash.
Expand Down

0 comments on commit 9e2925f

Please sign in to comment.