From eb8723daf74515c3e212d991ba60eb7de48ea651 Mon Sep 17 00:00:00 2001 From: nathanieliov Date: Wed, 15 Jan 2025 09:24:24 -0400 Subject: [PATCH 1/2] - Update bitcoinj-thin version to 0.14.4-rsk-17 - Update bitcoinj-thin hashes --- gradle/verification-metadata.xml | 10 +++++----- rskj-core/build.gradle | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 6509e80486..1686908c02 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -54,12 +54,12 @@ - - - + + + - - + + diff --git a/rskj-core/build.gradle b/rskj-core/build.gradle index f7e0671567..da25c5c451 100644 --- a/rskj-core/build.gradle +++ b/rskj-core/build.gradle @@ -273,7 +273,7 @@ ext { jaxwsRtVer : '2.3.5', picocliVer : '4.6.3', - bitcoinjThinVer: '0.14.4-rsk-17-SNAPSHOT', + bitcoinjThinVer: '0.14.4-rsk-17', rskjNativeVer: '1.3.0', ] From 33bc1d4f7375a554f8e4178bf7c4c5246340722e Mon Sep 17 00:00:00 2001 From: nathanieliov Date: Wed, 15 Jan 2025 09:54:10 -0400 Subject: [PATCH 2/2] Get rid of use of findWitnessCommitment from bitcoinj-thin --- .../test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/rskj-core/src/test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java b/rskj-core/src/test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java index 0f03d362af..3b7337928e 100644 --- a/rskj-core/src/test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java +++ b/rskj-core/src/test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java @@ -398,7 +398,6 @@ void findWitnessCommitment_whenTxHasNoOutputs_shouldThrowException() { // Act assertThrows(IllegalStateException.class, () -> BitcoinUtils.findWitnessCommitment(btcTx)); - assertThrows(IllegalStateException.class, btcTx::findWitnessCommitment); } @Test @@ -417,7 +416,6 @@ void findWitnessCommitment_whenTxIsNotCoinbase_shouldThrowException() { // Act assertThrows(IllegalStateException.class, () -> BitcoinUtils.findWitnessCommitment(btcTx)); - assertThrows(IllegalStateException.class, btcTx::findWitnessCommitment); } @Test @@ -430,7 +428,6 @@ void findWitnessCommitment_whenNoWitnessCommitment_shouldReturnEmpty() { // Assert assertFalse(witnessCommitment.isPresent()); - assertNull(btcTx.findWitnessCommitment()); } @Test @@ -448,7 +445,6 @@ void findWitnessCommitment_withWitnessCommitment_shouldReturnExpectedValue() { // Assert assertTrue(witnessCommitmentFound.isPresent()); assertEquals(witnessCommitment, witnessCommitmentFound.get()); - assertEquals(witnessCommitment, btcTx.findWitnessCommitment()); } @Test @@ -468,7 +464,6 @@ void findWitnessCommitment_withMultipleWitnessCommitments_shouldReturnLastOne() // Assert assertTrue(witnessCommitmentFound.isPresent()); assertEquals(witnessCommitment3, witnessCommitmentFound.get()); - assertEquals(witnessCommitment3, btcTx.findWitnessCommitment()); } @Test @@ -485,7 +480,6 @@ void findWitnessCommitment_withWrongWitnessCommitment_shouldReturnEmpty() { // Assert assertFalse(witnessCommitment.isPresent()); - assertEquals(fakeWitnessCommitment, btcTx.findWitnessCommitment()); // bitcoinj implementation detects it as a valid witness commitment } @Test @@ -502,7 +496,6 @@ void findWitnessCommitment_withRealTransaction_shouldReturnExpectedValue() { // Assert assertTrue(witnessCommitment.isPresent()); assertEquals(expectedWitnessCommitment, witnessCommitment.get()); - assertEquals(expectedWitnessCommitment, btcTx.findWitnessCommitment()); } } @@ -530,6 +523,5 @@ void findWitnessCommitment_withDataLargenThanExpected_shouldReturnEmpty() { // Assert, should not find the commitment since the data length != 36 bytes assertFalse(obtainedWitnessCommitment.isPresent()); - assertNull(btcTx.findWitnessCommitment()); } }