Skip to content

Commit

Permalink
Adapt to have the svp fund tx signed instead of the hash
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-zack committed Sep 17, 2024
1 parent 4519795 commit 8256285
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rskj-core/src/main/java/co/rsk/peg/BridgeSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 3 additions & 3 deletions rskj-core/src/test/java/co/rsk/peg/BridgeSupportTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Sha256Hash> svpFundTransactionHashSignedOpt = bridgeStorageProvider.getSvpFundTxHashSigned();
assertTrue(svpFundTransactionHashSignedOpt.isPresent());
Optional<BtcTransaction> svpFundTransactionSignedOpt = bridgeStorageProvider.getSvpFundTxSigned();
assertTrue(svpFundTransactionSignedOpt.isPresent());

assertFalse(bridgeStorageProvider.getSvpFundTxHashUnsigned().isPresent());
}
Expand Down

0 comments on commit 8256285

Please sign in to comment.