Skip to content

Commit

Permalink
Use all active forks in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Sep 6, 2024
1 parent bc13adb commit fd0ccd0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ void getNewFederationBtcUTXOs(

@Test
void getNewFederationBtcUTXOs_calledTwice_returnCachedUtxos() {
ActivationConfig.ForBlock wasabiActivations = ActivationConfigsForTest.wasabi100().forBlock(0);
StorageAccessor storageAccessor = new InMemoryStorage();
FederationStorageProvider federationStorageProvider = new FederationStorageProviderImpl(storageAccessor);

Expand All @@ -457,7 +456,7 @@ void getNewFederationBtcUTXOs_calledTwice_returnCachedUtxos() {
storageAccessor.saveToRepository(newFederationBtcUtxosKey, expectedUtxos, BridgeSerializationUtils::serializeUTXOList);

// Get utxos from method and check they are as expected
List<UTXO> actualUtxos = federationStorageProvider.getNewFederationBtcUTXOs(networkParameters, wasabiActivations);
List<UTXO> actualUtxos = federationStorageProvider.getNewFederationBtcUTXOs(networkParameters, activations);
assertEquals(1, actualUtxos.size());
assertEquals(expectedUtxos, actualUtxos);

Expand All @@ -466,7 +465,7 @@ void getNewFederationBtcUTXOs_calledTwice_returnCachedUtxos() {
storageAccessor.saveToRepository(newFederationBtcUtxosKey, extraUtxos, BridgeSerializationUtils::serializeUTXOList);

// Get utxos from method and check they are still the same as the original expected utxos since it is returning the cached utxos
List<UTXO> actualUtxosAfterSecondGet = federationStorageProvider.getNewFederationBtcUTXOs(null, wasabiActivations);
List<UTXO> actualUtxosAfterSecondGet = federationStorageProvider.getNewFederationBtcUTXOs(null, activations);
assertEquals(1, actualUtxosAfterSecondGet.size());
assertEquals(expectedUtxos, actualUtxosAfterSecondGet);

Expand Down

0 comments on commit fd0ccd0

Please sign in to comment.