Skip to content

Commit

Permalink
Allow Celo Cancun singer when requested
Browse files Browse the repository at this point in the history
This makes all tests pass without additional changes in other places. I
hope we'll find a cleaner solution to handle this.
  • Loading branch information
karlb committed Aug 30, 2024
1 parent 09868af commit 0ae3784
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/types/transaction_signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,17 @@ func MakeSigner(config *params.ChainConfig, blockNumber *big.Int, blockTime uint
// have the current block number available, use MakeSigner instead.
func LatestSigner(config *params.ChainConfig) Signer {
if config.ChainID != nil {
if config.Cel2Time != nil {
if config.CancunTime != nil {
// This branch is only used in testing
return latestCeloSigner(config.ChainID, NewCancunSigner(config.ChainID))
} else {
return latestCeloSigner(config.ChainID, NewLondonSigner(config.ChainID))
}
}
if config.CancunTime != nil && !config.IsOptimism() {
return NewCancunSigner(config.ChainID)
}
if config.Cel2Time != nil {
return latestCeloSigner(config.ChainID, NewLondonSigner(config.ChainID))
}
if config.LondonBlock != nil {
return NewLondonSigner(config.ChainID)
}
Expand Down

0 comments on commit 0ae3784

Please sign in to comment.