Skip to content

Commit

Permalink
Reuse already declared global variable for spend tx creation hash
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-zack committed Jan 8, 2025
1 parent a03a401 commit 34f4586
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions rskj-core/src/test/java/co/rsk/peg/BridgeSupportSvpTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ void updateCollections_whenSvpFundTxSignedSavedInStorage_shouldLogValidationFail
@Test
void updateCollections_whenSvpSpendTxWFSIsSet_shouldLogValidationFailureAndClearSpendTxValues() throws IOException {
// arrange
Keccak256 svpSpendTxCreationHash = RskTestUtils.createHash(1);
svpSpendTransaction = new BtcTransaction(btcMainnetParams);
Map.Entry<Keccak256, BtcTransaction> svpSpendTxWFS = new AbstractMap.SimpleEntry<>(svpSpendTxCreationHash, svpSpendTransaction);
bridgeStorageProvider.setSvpSpendTxWaitingForSignatures(svpSpendTxWFS);
Expand All @@ -268,7 +267,6 @@ void updateCollections_whenSvpSpendTxWFSIsSet_shouldLogValidationFailureAndClear
@Test
void updateCollections_whenSvpSpendTxWFSSavedInStorage_shouldLogValidationFailureAndClearSpendTxValues() throws IOException {
// arrange
Keccak256 svpSpendTxCreationHash = RskTestUtils.createHash(1);
svpSpendTransaction = new BtcTransaction(btcMainnetParams);
Map.Entry<Keccak256, BtcTransaction> svpSpendTxWFS = new AbstractMap.SimpleEntry<>(svpSpendTxCreationHash, svpSpendTransaction);
byte[] svpSpendTxWfsSerialized = BridgeSerializationUtils.serializeRskTxWaitingForSignatures(svpSpendTxWFS);
Expand Down Expand Up @@ -799,9 +797,6 @@ private BtcTransaction assertSvpSpendTxIsWaitingForSignatures() {
class SpendTxSigning {
private final List<BtcECKey> proposedFederationSignersKeys =
BitcoinTestUtils.getBtcEcKeysFromSeeds(new String[]{"member01", "member02", "member03", "member04", "member05"}, true); // this is needed to have the private keys too

private final Keccak256 svpSpendTxCreationHash = RskTestUtils.createHash(1);

private List<Sha256Hash> svpSpendTxSigHashes;

@BeforeEach
Expand Down

0 comments on commit 34f4586

Please sign in to comment.