From a6e294a50b0ae3fcefa19a76cc2c5dc9205069b1 Mon Sep 17 00:00:00 2001 From: julia-zack Date: Mon, 16 Sep 2024 20:58:55 -0300 Subject: [PATCH] Adapt to have the svp fund tx signed instead of the hash --- rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java | 2 +- rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 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 aca30972c57..6ff9f58e93a 100644 --- a/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java +++ b/rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java @@ -449,7 +449,7 @@ private void updateSvpFundTransactionValues(BtcTransaction transaction) { "[updateSvpFundTransactionValues] Transaction {} is the svp fund transaction. Going to update its values.", transaction ); - provider.setSvpFundTxHashSigned(transaction.getHash()); + provider.setSvpFundTxSigned(transaction); provider.setSvpFundTxHashUnsigned(null); } 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 a5c177fe3e5..1e7f0d2187f 100644 --- a/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java +++ b/rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java @@ -929,12 +929,12 @@ private void assertTransactionWasProcessed(Sha256Hash transactionHash) throws IO private void assertSvpFundTransactionValuesWereNotUpdated() { assertTrue(bridgeStorageProvider.getSvpFundTxHashUnsigned().isPresent()); - assertFalse(bridgeStorageProvider.getSvpFundTxHashSigned().isPresent()); + assertFalse(bridgeStorageProvider.getSvpFundTxSigned().isPresent()); } private void assertSvpFundTransactionValuesWereUpdated() { - Optional svpFundTransactionHashSignedOpt = bridgeStorageProvider.getSvpFundTxHashSigned(); - assertTrue(svpFundTransactionHashSignedOpt.isPresent()); + Optional svpFundTransactionSignedOpt = bridgeStorageProvider.getSvpFundTxSigned(); + assertTrue(svpFundTransactionSignedOpt.isPresent()); assertFalse(bridgeStorageProvider.getSvpFundTxHashUnsigned().isPresent()); }