From e53293325e827e14c5bf13ce3e37df2c1dc4c888 Mon Sep 17 00:00:00 2001 From: Ilan Date: Tue, 22 Nov 2022 11:40:41 -0300 Subject: [PATCH] Add RSKIP 144 to fingerroot500 --- rskj-core/src/main/resources/reference.conf | 2 +- .../src/test/java/co/rsk/cli/tools/CliToolsTest.java | 11 +++++++---- .../blockchain/upgrades/ActivationConfigTest.java | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/rskj-core/src/main/resources/reference.conf b/rskj-core/src/main/resources/reference.conf index 8471b19f9f4..91c899a691a 100644 --- a/rskj-core/src/main/resources/reference.conf +++ b/rskj-core/src/main/resources/reference.conf @@ -64,7 +64,7 @@ blockchain = { rskip294 = hop400 rskip297 = hop400 rskip351 = fingerroot500 - rskip144 = hop400 + rskip144 = fingerroot500 rskip353 = hop401 rskip357 = hop401 } diff --git a/rskj-core/src/test/java/co/rsk/cli/tools/CliToolsTest.java b/rskj-core/src/test/java/co/rsk/cli/tools/CliToolsTest.java index 3c307270e5b..9eb8797e7d5 100644 --- a/rskj-core/src/test/java/co/rsk/cli/tools/CliToolsTest.java +++ b/rskj-core/src/test/java/co/rsk/cli/tools/CliToolsTest.java @@ -335,11 +335,12 @@ void testImportBlocks(World world) throws IOException, DslProcessorException { } @Test - void importBlocks() throws IOException, DslProcessorException { + void importBlocksWithoutRskip351() throws IOException, DslProcessorException { ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); TestSystemProperties config = new TestSystemProperties(rawConfig -> - rawConfig.withValue("blockchain.config.hardforkActivationHeights.fingerroot500", ConfigValueFactory.fromAnyRef(-1)) + rawConfig.withValue("blockchain.config.consensusRules.rskip351", ConfigValueFactory.fromAnyRef(-1)) ); + Assertions.assertFalse(config.getActivationConfig().isActive(ConsensusRule.RSKIP351, 3)); World world = new World(receiptStore, config); testImportBlocks(world); } @@ -348,14 +349,16 @@ void importBlocks() throws IOException, DslProcessorException { void importBlocksWithRskip351InMiddle() throws IOException, DslProcessorException { ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); TestSystemProperties config = new TestSystemProperties(rawConfig -> - rawConfig.withValue("blockchain.config.hardforkActivationHeights.fingerroot500", ConfigValueFactory.fromAnyRef(2)) + rawConfig.withValue("blockchain.config.consensusRules.rskip351", ConfigValueFactory.fromAnyRef(2)) ); + Assertions.assertFalse(config.getActivationConfig().isActive(ConsensusRule.RSKIP351, 1)); + Assertions.assertTrue(config.getActivationConfig().isActive(ConsensusRule.RSKIP351, 2)); World world = new World(receiptStore, config); testImportBlocks(world); } @Test - void importBlocksWithRskip351() throws IOException, DslProcessorException { + void importBlocks() throws IOException, DslProcessorException { ReceiptStore receiptStore = new ReceiptStoreImpl(new HashMapDB()); World world = new World(receiptStore); testImportBlocks(world); diff --git a/rskj-core/src/test/java/org/ethereum/config/blockchain/upgrades/ActivationConfigTest.java b/rskj-core/src/test/java/org/ethereum/config/blockchain/upgrades/ActivationConfigTest.java index adeb03fd736..cadb3ed2036 100644 --- a/rskj-core/src/test/java/org/ethereum/config/blockchain/upgrades/ActivationConfigTest.java +++ b/rskj-core/src/test/java/org/ethereum/config/blockchain/upgrades/ActivationConfigTest.java @@ -101,7 +101,7 @@ class ActivationConfigTest { " rskip290: hop400", " rskip293: hop400", " rskip294: hop400", - " rskip144: hop400", + " rskip144: fingerroot500", " rskip297: hop400", " rskip351: fingerroot500", " rskip353: hop401",