This repository has been archived by the owner on Aug 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1258 from GalRogozinski/spentaddresses-pruning
Spentaddresses are persisted upon pruning
- Loading branch information
Showing
17 changed files
with
188 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
src/main/java/com/iota/iri/service/tipselection/TailFinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
package com.iota.iri.service.tipselection; | ||
|
||
import java.util.Optional; | ||
|
||
import com.iota.iri.controllers.TransactionViewModel; | ||
import com.iota.iri.model.Hash; | ||
|
||
import java.util.Optional; | ||
|
||
/** | ||
* Finds the tail of a bundle | ||
*/ | ||
|
||
@FunctionalInterface | ||
public interface TailFinder { | ||
/** | ||
*Method for finding a tail (current_index=0) of a bundle given any transaction in the associated bundle. | ||
* Method for finding a tail (current_index=0) of a bundle given any transaction in the associated bundle. | ||
* | ||
* @param hash The transaction hash of any transaction in the bundle. | ||
* @return Hash of the tail transaction, or {@code Empty} if the tail is not found. | ||
* @throws Exception If DB fails to retrieve transactions | ||
*/ | ||
Optional<Hash> findTail(Hash hash) throws Exception; | ||
|
||
/** | ||
* Method for finding a tail (current_index=0) of a bundle given any transaction in the associated bundle. | ||
* | ||
* @param tx any transaction in the bundle. | ||
* @return Hash of the tail transaction, or {@code Empty} if the tail is not found. | ||
* @throws Exception If DB fails to retrieve transactions | ||
*/ | ||
Optional<Hash> findTailFromTx(TransactionViewModel tx) throws Exception; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.