@@ -439,19 +439,22 @@ func TestPrecompiledP256Verify(t *testing.T) {
439439// BOR: if this test failed, it means you should include PrecompiledP256Verify in the PrecompiledContracts
440440// TODO: handle when common.BytesToAddress([]byte{0x01, 0x00}) will colide a new Ethereum's precompile
441441func TestPrecompiledP256VerifyAlwaysAvailableInHFs (t * testing.T ) {
442- latestHfRules := params .BorMainnetChainConfig .Rules (big .NewInt (math .MaxInt64 ), true , 0 )
443- precompiledP256VerifyAddress := common .BytesToAddress ([]byte {0x01 , 0x00 })
444-
445- addresses := ActivePrecompiles (latestHfRules )
446- addressFound := false
447- for _ , addr := range addresses {
448- if addr == precompiledP256VerifyAddress {
449- addressFound = true
450- break
442+ chainConfigs := []* params.ChainConfig {params .BorMainnetChainConfig , params .AmoyChainConfig }
443+ for _ , chainConfig := range chainConfigs {
444+ latestHfRules := chainConfig .Rules (big .NewInt (math .MaxInt64 ), true , 0 )
445+ precompiledP256VerifyAddress := common .BytesToAddress ([]byte {0x01 , 0x00 })
446+
447+ addresses := ActivePrecompiles (latestHfRules )
448+ addressFound := false
449+ for _ , addr := range addresses {
450+ if addr == precompiledP256VerifyAddress {
451+ addressFound = true
452+ break
453+ }
451454 }
452- }
453- assert .Equal (t , true , addressFound )
455+ assert .Equal (t , true , addressFound )
454456
455- preCompiledContracts := ActivePrecompiledContracts (latestHfRules )
456- assert .Equal (t , & p256Verify {}, preCompiledContracts [precompiledP256VerifyAddress ])
457+ preCompiledContracts := ActivePrecompiledContracts (latestHfRules )
458+ assert .Equal (t , & p256Verify {}, preCompiledContracts [precompiledP256VerifyAddress ])
459+ }
457460}
0 commit comments