generic upstreams introduced (#317)

- added base implementation of upstreams/multistreams
- connectors were generalised, chain specific logic was extracted to ChainSpecific class
- StarkNet network support based on generic upstreams added
This commit is contained in:
a10zn8
2023-10-09 23:17:16 +04:00
committed by GitHub
parent 222e046e32
commit f3bf34768a
56 changed files with 864 additions and 364 deletions

View File

@@ -4,6 +4,7 @@ import io.emeraldpay.dshackle.config.ChainsConfigReader
import io.emeraldpay.dshackle.foundation.ChainOptionsReader
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import java.math.BigInteger
internal class ChainsConfigReaderTest {
@@ -19,7 +20,7 @@ internal class ChainsConfigReaderTest {
val ethc = config.resolve("ethereum-classic")
assertEquals(ethc.chainId, "0x3d")
assertEquals(ethc.netVersion, 1)
assertEquals(ethc.netVersion, BigInteger.valueOf(1))
assertEquals(ethc.code, "ETC")
assertEquals(ethc.grpcId, 101)
assertEquals(ethc.expectedBlockTime.seconds, 12)
@@ -39,6 +40,6 @@ internal class ChainsConfigReaderTest {
assertEquals(config.laggingLagSize, 4)
assertEquals(config.code, "FTA")
assertEquals(config.grpcId, 102)
assertEquals(config.netVersion, 251)
assertEquals(config.netVersion, BigInteger.valueOf(251))
}
}