From 3d4d58a3fd38bb5f2ef1a2b67fd5dc1bbc268484 Mon Sep 17 00:00:00 2001 From: julia-zack Date: Mon, 9 Sep 2024 17:00:37 -0300 Subject: [PATCH] Adapt to methods renaming --- rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java | 3 +-- rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java b/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java index 4f8146df768..4bd6251f6e6 100644 --- a/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java +++ b/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java @@ -432,7 +432,7 @@ private void processSvpFundTransactionHashSigned(BtcTransaction transaction) { Sha256Hash fundTransactionHashUnsigned = fundTransactionHashUnsignedOpt.get(); BtcTransaction transactionCopy = new BtcTransaction(networkParameters, transaction.bitcoinSerialize()); // this is needed to not remove signatures from the actual tx - BitcoinUtils.removeSignaturesFromNonSegwitTransaction(transactionCopy); + BitcoinUtils.removeSignaturesFromTransactionWithInputsWithP2shMultiSigInputScript(transactionCopy); if (transactionCopy.getHash().equals(fundTransactionHashUnsigned)) { provider.setSvpFundTxHashSigned(transaction.getHash()); provider.setSvpFundTxHashUnsigned(null); @@ -706,7 +706,6 @@ private void refundTxSender( private void markTxAsProcessed(BtcTransaction btcTx) throws IOException { // Mark tx as processed on this block (and use the txid without the witness) long rskHeight = rskExecutionBlock.getNumber(); - Sha256Hash hash = btcTx.getHash(false); provider.setHeightBtcTxhashAlreadyProcessed(btcTx.getHash(false), rskHeight); logger.debug( "[markTxAsProcessed] Mark btc transaction {} as processed at height {}", diff --git a/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java b/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java index e42b98d7edd..039715ba710 100644 --- a/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java +++ b/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java @@ -930,7 +930,7 @@ private void randomSignTransactionInputs(BtcTransaction transaction, int amountO List inputs = transaction.getInputs(); for (TransactionInput input : inputs) { int inputIndex = inputs.indexOf(input); - BitcoinTestUtils.addSignaturesToInput(transaction, inputIndex, keysToSign); + BitcoinTestUtils.signTransactionInputFromMultiSigWithKeys(transaction, inputIndex, keysToSign); } }