-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Consensus Client works only if it is approved on a chain registry; - Approvals and rejections are detected during work; - Migrated settings from ficus to pureconfig; - New tests.
- Loading branch information
1 parent
e51a320
commit 6f265f0
Showing
24 changed files
with
242 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
consensus-client-it/src/test/scala/units/RegistryDockerTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package units | ||
|
||
class RegistryDockerTestSuite extends BaseDockerTestSuite { | ||
"Approved, rejected, approved - mining works when approved" in { | ||
step(s"Wait miner 1 (${miner11Account.toAddress}) forge at least one block") | ||
chainContract.waitForHeight(1L) | ||
|
||
step("Broadcast a reject transaction") | ||
val rejectTxnHeight = waves1.api.broadcastAndWait(ChainRegistry.reject()).height | ||
|
||
step("Wait a rejection height") | ||
waves1.api.waitForHeight(rejectTxnHeight + 1) | ||
val lastElBlock1 = chainContract.getLastBlockMeta(0L).value | ||
|
||
step("Expect no mining") | ||
waves1.api.waitForHeight(rejectTxnHeight + 2) | ||
|
||
val lastElBlock2 = chainContract.getLastBlockMeta(0L).value | ||
withClue("Same block - no mining: ") { | ||
lastElBlock2.hash shouldBe lastElBlock1.hash | ||
} | ||
|
||
val approveTxnHeight = waves1.api.broadcastAndWait(ChainRegistry.approve()).height | ||
step("Wait an approval height") | ||
waves1.api.waitForHeight(approveTxnHeight + 1) | ||
|
||
step("Mining working") | ||
chainContract.waitForHeight(lastElBlock2.height + 1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG baseImage=ghcr.io/wavesplatform/waves:1.5.8-1 | ||
ARG baseImage=ghcr.io/wavesplatform/waves:units-registry | ||
FROM $baseImage | ||
COPY target /tmp/ | ||
RUN tar zxvf /tmp/consensus-client.tgz -C $WAVES_INSTALL_PATH --strip-components=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.