Skip to content

Commit

Permalink
Update another test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Sep 27, 2024
1 parent a9f188a commit 97a1f45
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions rskj-core/src/test/java/co/rsk/peg/bitcoin/BitcoinUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,18 @@ void removeSignaturesFromTransaction_whenTransactionInputsDoNotHaveP2shMultiSigI
transaction.addInput(BitcoinTestUtils.createHash(1), 0, p2pkhScriptSig);

// act & assert
IllegalArgumentException exception = Assertions.assertThrows(IllegalArgumentException.class,
() -> BitcoinUtils.removeSignaturesFromTransactionWithP2shMultiSigInputs(transaction));
Assertions.assertEquals("Cannot remove signatures from transaction inputs that do not have p2sh multisig input script.", exception.getMessage());
try {
BitcoinUtils.removeSignaturesFromTransactionWithP2shMultiSigInputs(transaction);
} catch (IllegalArgumentException e) {
// assert
Assertions.assertEquals("Cannot remove signatures from transaction inputs that do not have p2sh multisig input script.", e.getMessage());
} catch (Exception e) {
System.out.println("Unexpected exception: " + e.getMessage());
System.out.println("Exception type: " + e.getClass().getName());

System.out.println("Key used: " + pubKey);
fail();
}
}

@Test
Expand Down

0 comments on commit 97a1f45

Please sign in to comment.