Skip to content

Commit

Permalink
Update library versions in gradle/libs.versions.toml (#81)
Browse files Browse the repository at this point in the history
* Update library versions in gradle/libs.versions.toml

Upgraded cardano-client-core to 0.6.0 and netty to 4.1.113.Final. Updated project-reactor-core and project-reactor-test to 3.6.10.

* Bump version

* Switch tests to use preprod network

Updated BlockStreamerTest to use preprod network configurations instead of mainnet.
  • Loading branch information
satran004 authored Sep 17, 2024
1 parent 6991b0d commit 08fd32b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group = com.bloxbean.cardano
artifactId = yaci
version = 0.3.0-beta16-SNAPSHOT
version = 0.3.0-rc1
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[libraries]
cardano-client-core = "com.bloxbean.cardano:cardano-client-core:0.5.1"
cardano-client-core = "com.bloxbean.cardano:cardano-client-core:0.6.0"
cbor = "co.nstant.in:cbor:0.9"
netty = "io.netty:netty-all:4.1.108.Final"
project-reactor-core = "io.projectreactor:reactor-core:3.6.3"
project-reactor-test = "io.projectreactor:reactor-test:3.6.3"
netty = "io.netty:netty-all:4.1.113.Final"
project-reactor-core = "io.projectreactor:reactor-core:3.6.10"
project-reactor-test = "io.projectreactor:reactor-test:3.6.10"

slf4j-api = "org.slf4j:slf4j-api:2.0.11"
slf4j-reload4j="org.slf4j:slf4j-reload4j:2.0.11"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class BlockStreamerTest {

@Test
void of() throws InterruptedException {
VersionTable versionTable = N2NVersionTableConstant.v4AndAbove(Networks.mainnet().getProtocolMagic());
Point wellKnownPoint = new Point(17625824, "765359c702103513dcb8ff4fe86c1a1522c07535733f31ff23231ccd9a3e0247");
VersionTable versionTable = N2NVersionTableConstant.v4AndAbove(Networks.preprod().getProtocolMagic());
Point wellKnownPoint = new Point(46770229, "580c39df75eaf0b69e30dec115ba57e7062a006c4071dc47542ea8f2c8405c53");

Flux<Block> flux = BlockStreamer.fromLatest(Constants.MAINNET_IOHK_RELAY_ADDR, Constants.MAINNET_IOHK_RELAY_PORT, wellKnownPoint, versionTable).stream();
Flux<Block> flux = BlockStreamer.fromLatest(Constants.PREPROD_IOHK_RELAY_ADDR, Constants.PREPROD_IOHK_RELAY_PORT, wellKnownPoint, versionTable).stream();

CountDownLatch countDownLatch = new CountDownLatch(1);
List<Block> blocks = new ArrayList<>();
Expand All @@ -44,14 +44,14 @@ void of() throws InterruptedException {
disposable.dispose();

assertThat(blocks).hasSize(1);
assertThat(blocks.get(0).getHeader().getHeaderBody().getBlockNumber()).isGreaterThan(8025579);
assertThat(blocks.get(0).getHeader().getHeaderBody().getBlockNumber()).isGreaterThan(2696981);
}

@Test
void streamLatestFromMainnet() throws InterruptedException {
void streamLatestFromPreprod() throws InterruptedException {
CountDownLatch countDownLatch = new CountDownLatch(2);
Flux<Amount> flux = BlockStreamer.fromPoint(NetworkType.MAINNET,
Constants.WELL_KNOWN_MAINNET_POINT)
Flux<Amount> flux = BlockStreamer.fromPoint(NetworkType.PREPROD,
Constants.WELL_KNOWN_PREPROD_POINT)
.stream()
.map(block -> {
System.out.println("\n-----------------------------------------------------------");
Expand Down Expand Up @@ -103,9 +103,9 @@ void streamLatestFromPreprod_fromByron() throws InterruptedException {

@Test
@Timeout(value = 40000, unit = TimeUnit.MILLISECONDS)
void streamFromPointFromMainnet() throws InterruptedException {
void streamFromPointFromPreprod() throws InterruptedException {
CountDownLatch countDownLatch = new CountDownLatch(2);
Flux<Amount> flux = BlockStreamer.fromPoint(NetworkType.MAINNET, new Point(39916796, "e72579ff89dc9ed325b723a33624b596c08141c7bd573ecfff56a1f7229e4d09"))
Flux<Amount> flux = BlockStreamer.fromPoint(NetworkType.PREPROD, new Point(46770233, "2c0dfd9fef43d5dcf80d4614a2bc891f9dd5c04b757ab0221165642b17f13885"))
.stream()
.map(block -> {
System.out.println("\n-----------------------------------------------------------");
Expand All @@ -129,12 +129,12 @@ void streamFromPointFromMainnet() throws InterruptedException {
}

@Test
void streamForRangeFromMainnet() throws InterruptedException {
void streamForRangeFromPreprod() throws InterruptedException {
CountDownLatch countDownLatch = new CountDownLatch(2);
Point from = new Point(43847831, "15b9eeee849dd6386d3770b0745e0450190f7560e5159b1b3ab13b14b2684a45");
Point to = new Point(43847844, "ff8d558a3d5a0e058beb3d94d26a567f75cd7d09ff5485aa0d0ebc38b61378d4");
Point from = new Point(53779466, "6fbe92b70705384ad9d79c0fa4d7dcbda4d57b9452402429b7e102d51ba3fdbd");
Point to = new Point(53779632, "b42ef491d7e64304310eab9feff12d3ecabe4208df03bb32f56625dff45ae28f");

Flux<Amount> flux = BlockStreamer.forRange(NetworkType.MAINNET, from, to)
Flux<Amount> flux = BlockStreamer.forRange(NetworkType.PREPROD, from, to)
.stream()
.map(block -> {
System.out.println("\n-----------------------------------------------------------");
Expand Down

0 comments on commit 08fd32b

Please sign in to comment.