mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 00:09:31 +01:00
Wallet: add getConfidence(tx)
method and use it in waitForConfirmations()
The other `getConfidence()` methods in `Transaction` eventually call the one that takes a `TxConfidenceTable`, so we call that one directly. Also prepares for not using `Transaction` to find the `TransactionConfidence`.
This commit is contained in:
parent
19fcdcdd5b
commit
9d78d2bd9e
1 changed files with 6 additions and 1 deletions
|
@ -4497,7 +4497,12 @@ public class Wallet extends BaseTaggableObject
|
|||
* @return a future for an object that contains transaction confidence information
|
||||
*/
|
||||
public CompletableFuture<TransactionConfidence> waitForConfirmations(Transaction tx, int requiredConfirmations) {
|
||||
return tx.getConfidence().getDepthFuture(requiredConfirmations);
|
||||
|
||||
return getConfidence(tx).getDepthFuture(requiredConfirmations);
|
||||
}
|
||||
|
||||
private TransactionConfidence getConfidence(Transaction tx) {
|
||||
return tx.getConfidence(Context.get().getConfidenceTable());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue