Skip to content

Commit

Permalink
Add RSKIP 144 to fingerroot500
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanolkies committed Nov 22, 2022
1 parent ccf4e1f commit e532933
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rskj-core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ blockchain = {
rskip294 = hop400
rskip297 = hop400
rskip351 = fingerroot500
rskip144 = hop400
rskip144 = fingerroot500
rskip353 = hop401
rskip357 = hop401
}
Expand Down
11 changes: 7 additions & 4 deletions rskj-core/src/test/java/co/rsk/cli/tools/CliToolsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ActivationConfigTest {
" rskip290: hop400",
" rskip293: hop400",
" rskip294: hop400",
" rskip144: hop400",
" rskip144: fingerroot500",
" rskip297: hop400",
" rskip351: fingerroot500",
" rskip353: hop401",
Expand Down

0 comments on commit e532933

Please sign in to comment.