Skip to content

Commit

Permalink
Correct typo and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
julia-zack committed Sep 18, 2024
1 parent 47da759 commit e686bab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public Optional<BtcTransaction> getSvpFundTxSigned() {
return Optional.of(svpFundTxSigned);
}

// Return empty if the svp fund tx hash unsigned was explicitly set to null
// Return empty if the svp fund tx signed was explicitly set to null
if (isSvpFundTxSignedSet) {
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ void saveSvpFundTxSigned_postLovell700_shouldSaveInStorage() {

@Test
void saveSvpFundTxSigned_postLovell700AndResettingToNull_shouldSaveNullInStorage() {
// Initially setting a valid hash in storage
// Initially setting a valid tx in storage
bridgeStorageProvider.setSvpFundTxSigned(svpFundTx);
bridgeStorageProvider.save();

Expand Down Expand Up @@ -583,17 +583,17 @@ void getSvpFundTxSigned_whenNullHashSaved_shouldReturnEmpty() {
@Test
void getSvpFundTxSigned_whenHashIsCached_shouldReturnTheCachedHash() {
// Arrange
// Manually saving a hash in storage to then cache it
// Manually saving a tx in storage to then cache it
repository.addStorageBytes(
bridgeAddress,
SVP_FUND_TX_SIGNED.getKey(),
BridgeSerializationUtils.serializeBtcTransaction(svpFundTx)
);

// Calling method, so it retrieves the hash from storage and caches it
// Calling method, so it retrieves the tx from storage and caches it
bridgeStorageProvider.getSvpFundTxSigned();

// Setting a different hash in storage to make sure that when calling the method again it returns the cached one, not this one
// Setting a different tx in storage to make sure that when calling the method again it returns the cached one, not this one
repository.addStorageBytes(
bridgeAddress,
SVP_FUND_TX_SIGNED.getKey(),
Expand All @@ -611,17 +611,17 @@ void getSvpFundTxSigned_whenHashIsCached_shouldReturnTheCachedHash() {
@Test
void getSvpFundTxSigned_whenNullHashIsCached_shouldReturnNewSavedHash() {
// Arrange
// Manually saving a null hash in storage to then cache it
// Manually saving a null tx in storage to then cache it
repository.addStorageBytes(
bridgeAddress,
SVP_FUND_TX_SIGNED.getKey(),
null
);

// Calling method, so it retrieves the hash from storage and caches it
// Calling method, so it retrieves the tx from storage and caches it
bridgeStorageProvider.getSvpFundTxSigned();

// Setting a hash in storage
// Setting a tx in storage
repository.addStorageBytes(
bridgeAddress,
SVP_FUND_TX_SIGNED.getKey(),
Expand All @@ -632,7 +632,7 @@ void getSvpFundTxSigned_whenNullHashIsCached_shouldReturnNewSavedHash() {
Optional<BtcTransaction> svpFundTxSigned = bridgeStorageProvider.getSvpFundTxSigned();

// Assert
// since null hash was directly saved and not set, method returns new saved hash
// since null tx was directly saved and not set, method returns new saved tx
assertTrue(svpFundTxSigned.isPresent());
assertEquals(anotherSvpFundTx, svpFundTxSigned.get());
}
Expand Down

0 comments on commit e686bab

Please sign in to comment.