Skip to content

Commit 8ffee98

Browse files
committed
wip
1 parent 034fcbc commit 8ffee98

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

consensus-client-it/src/test/scala/units/BaseDockerTestSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ trait BaseDockerTestSuite
4646

4747
protected lazy val wavesGenesisConfigPath = generateWavesGenesisConfig()
4848

49-
private implicit val httpClientBackend: SttpBackend[Identity, Any] = new LoggingBackend(HttpClientSyncBackend())
49+
protected implicit val httpClientBackend: SttpBackend[Identity, Any] = new LoggingBackend(HttpClientSyncBackend())
5050

5151
/*
5252
* ipForNode(1) -> Ryuk

consensus-client-it/src/test/scala/units/SyncingTestSuite.scala

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package units
22

3-
import com.wavesplatform.state.Height
3+
import com.wavesplatform.state.{Height, StringDataEntry}
44
import com.wavesplatform.utils.EthEncoding
55
import org.web3j.crypto.{RawTransaction, TransactionEncoder}
66
import org.web3j.protocol.core.methods.response.{EthSendTransaction, TransactionReceipt}
77
import org.web3j.tx.gas.DefaultGasProvider
88
import org.web3j.utils.Convert
9-
import units.docker.EcContainer
9+
import units.docker.{EcContainer, Networks, WavesNodeContainer}
1010

1111
import java.math.BigInteger
1212
import scala.jdk.OptionConverters.RichOptional
@@ -17,6 +17,28 @@ class SyncingTestSuite extends BaseDockerTestSuite {
1717
private val elSender = elRichAccount1
1818
private val amount = Convert.toWei("1", Convert.Unit.ETHER).toBigInteger
1919

20+
override protected lazy val waves1: WavesNodeContainer = new WavesNodeContainer(
21+
network = network,
22+
number = 1,
23+
ip = Networks.ipForNode(3),
24+
baseSeed = "devnet-2",
25+
chainContractAddress = chainContractAddress,
26+
ecEngineApiUrl = ec1.engineApiDockerUrl,
27+
genesisConfigPath = wavesGenesisConfigPath
28+
)
29+
30+
override def beforeAll(): Unit = {
31+
super.beforeAll()
32+
waves1.api.broadcast(ChainContract.join(miner21Account, miner21RewardAddress))
33+
34+
eventually {
35+
waves1.api.dataByKey(chainContractAddress, "allMiners") match {
36+
case Some(StringDataEntry(_, value)) => value.split(",").length shouldBe 2
37+
case _ => fail("not all miners have joined")
38+
}
39+
}
40+
}
41+
2042
"L2-381 EL transactions appear after rollback" in {
2143
step("Send transaction 1")
2244
val txn1Result = sendTxn(0)
@@ -44,7 +66,7 @@ class SyncingTestSuite extends BaseDockerTestSuite {
4466
waves1.api.rollback(Height(contractBlock.epoch - 1))
4567

4668
step("Wait for EL blocks")
47-
eventually(Timeout(1.minute), Interval(10.seconds)) {
69+
eventually(Timeout(2.minutes), Interval(10.seconds)) {
4870
ec1.web3j.ethBlockNumber().send().getBlockNumber.intValueExact() should be >= elWaitHeight
4971
}
5072

0 commit comments

Comments
 (0)