feat: schedule DarwinV2 (#1016)

* minor

* feat: schedule DarwinV2
This commit is contained in:
HAOYUatHZ 2024-08-30 08:10:12 +08:00 committed by GitHub
parent 40f425df86
commit 961db0f415
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 0 deletions

View file

@ -4728,6 +4728,7 @@ func TestCurieTransition(t *testing.T) {
json.Unmarshal(b, &config)
config.CurieBlock = big.NewInt(2)
config.DarwinTime = nil
config.DarwinV2Time = nil
var (
db = rawdb.NewMemoryDatabase()

View file

@ -67,6 +67,7 @@ func TestStateProcessorErrors(t *testing.T) {
BernoulliBlock: big.NewInt(0),
CurieBlock: big.NewInt(0),
DarwinTime: new(uint64),
DarwinV2Time: new(uint64),
}
signer = types.LatestSigner(config)
key1, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")

View file

@ -75,6 +75,7 @@ func setDefaults(cfg *Config) {
BernoulliBlock: new(big.Int),
CurieBlock: new(big.Int),
DarwinTime: new(uint64),
DarwinV2Time: new(uint64),
}
}

View file

@ -153,11 +153,14 @@ func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool, pendingTxC
config.CurieBlock = londonBlock
config.ShanghaiTime = nil
config.DarwinTime = nil
config.DarwinV2Time = nil
if londonBlock != nil {
shanghaiTime := londonBlock.Uint64() * 12
config.ShanghaiTime = &shanghaiTime
darwinTime := londonBlock.Uint64() * 12
config.DarwinTime = &darwinTime
darwinV2Time := londonBlock.Uint64() * 12
config.DarwinV2Time = &darwinV2Time
}
config.TerminalTotalDifficulty = common.Big0

View file

@ -234,11 +234,14 @@ func newBackendMock() *backendMock {
config.CurieBlock = config.LondonBlock
config.ShanghaiTime = nil
config.DarwinTime = nil
config.DarwinV2Time = nil
if config.LondonBlock != nil {
shanghaiTime := config.LondonBlock.Uint64() * 12
config.ShanghaiTime = &shanghaiTime
darwinTime := config.LondonBlock.Uint64() * 12
config.DarwinTime = &darwinTime
darwinV2Time := config.LondonBlock.Uint64() * 12
config.DarwinV2Time = &darwinV2Time
}
return &backendMock{

View file

@ -205,6 +205,7 @@ var (
BernoulliBlock: big.NewInt(3747132),
CurieBlock: big.NewInt(4740239),
DarwinTime: newUint64(1723622400),
DarwinV2Time: newUint64(1724832000),
Clique: &CliqueConfig{
Period: 3,
Epoch: 30000,
@ -245,6 +246,7 @@ var (
BernoulliBlock: big.NewInt(5220340),
CurieBlock: big.NewInt(7096836),
DarwinTime: newUint64(1724227200),
DarwinV2Time: newUint64(1725264000),
Clique: &CliqueConfig{
Period: 3,
Epoch: 30000,