mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
KeyTimeCoinSelector: use Wallet.getConfidence(parent)
in isConfirmed()
Also make `Wallet.getConfidence(parent)` package-private.
This commit is contained in:
parent
bbe7f088ca
commit
0c7e1aec3b
2 changed files with 2 additions and 2 deletions
|
@ -98,6 +98,6 @@ public class KeyTimeCoinSelector implements CoinSelector {
|
||||||
|
|
||||||
private boolean isConfirmed(TransactionOutput output) {
|
private boolean isConfirmed(TransactionOutput output) {
|
||||||
Transaction parent = Objects.requireNonNull(output.getParentTransaction());
|
Transaction parent = Objects.requireNonNull(output.getParentTransaction());
|
||||||
return parent.getConfidence().getConfidenceType().equals(TransactionConfidence.ConfidenceType.BUILDING);
|
return wallet.getConfidence(parent).getConfidenceType().equals(TransactionConfidence.ConfidenceType.BUILDING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4501,7 +4501,7 @@ public class Wallet extends BaseTaggableObject
|
||||||
return getConfidence(tx).getDepthFuture(requiredConfirmations);
|
return getConfidence(tx).getDepthFuture(requiredConfirmations);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TransactionConfidence getConfidence(Transaction tx) {
|
TransactionConfidence getConfidence(Transaction tx) {
|
||||||
return Context.get().getConfidenceTable().getConfidence(tx);
|
return Context.get().getConfidenceTable().getConfidence(tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue