@@ -199,12 +199,12 @@ func TestConstantinople(t *testing.T) {
199199 },
200200 {
201201 "io1pcg2ja9krrhujpazswgz77ss46xgt88afqlk6y" ,
202- 37662680 ,
202+ 21542760 ,
203203 },
204204 // after Okhotsk
205205 {
206206 action .EmptyAddress ,
207- 37662681 ,
207+ 21542761 ,
208208 },
209209 {
210210 "io1pcg2ja9krrhujpazswgz77ss46xgt88afqlk6y" ,
@@ -222,25 +222,14 @@ func TestConstantinople(t *testing.T) {
222222 nil ,
223223 )
224224 require .NoError (err )
225- opt := []StateDBAdapterOption {}
226- if ! g .IsAleutian (e .height ) {
227- opt = append (opt , NotFixTopicCopyBugOption ())
228- }
229- if g .IsGreenland (e .height ) {
230- opt = append (opt , AsyncContractTrieOption ())
231- }
232- if g .IsKamchatka (e .height ) {
233- opt = append (opt , FixSnapshotOrderOption ())
234- }
235- stateDB , err := NewStateDBAdapter (sm , e .height , hash .ZeroHash256 , opt ... )
236- require .NoError (err )
237225
238- fCtx := protocol .WithBlockCtx (ctx , protocol.BlockCtx {
226+ fCtx := protocol .WithFeatureCtx ( protocol . WithBlockCtx (ctx , protocol.BlockCtx {
239227 Producer : identityset .Address (27 ),
240228 GasLimit : testutil .TestGasLimit ,
241229 BlockHeight : e .height ,
242- })
243- fCtx = protocol .WithFeatureCtx (fCtx )
230+ }))
231+ stateDB , err := prepareStateDB (fCtx , sm )
232+ require .NoError (err )
244233 ps , err := newParams (fCtx , ex , stateDB , func (uint64 ) (hash.Hash256 , error ) {
245234 return hash .ZeroHash256 , nil
246235 })
@@ -289,6 +278,8 @@ func TestConstantinople(t *testing.T) {
289278
290279 // Okhotsk = enable Berlin and London
291280 isOkhotsk := g .IsOkhotsk (e .height )
281+ require .Equal (big .NewInt (int64 (g .OkhotskBlockHeight )), evmChainConfig .BerlinBlock )
282+ require .Equal (big .NewInt (int64 (g .OkhotskBlockHeight )), evmChainConfig .LondonBlock )
292283 require .Equal (isOkhotsk , evmChainConfig .IsBerlin (evm .Context .BlockNumber ))
293284 require .Equal (isOkhotsk , chainRules .IsBerlin )
294285 require .Equal (isOkhotsk , evmChainConfig .IsLondon (evm .Context .BlockNumber ))
0 commit comments