TxConfidenceTable: new method getConfidence(Transaction)

Use it in `Wallet`.
This commit is contained in:
Sean Gilligan 2023-09-01 18:59:07 +02:00 committed by Andreas Schildbach
parent dfcaa97b6e
commit 5ff114b7b8
2 changed files with 10 additions and 1 deletions

View file

@ -92,6 +92,15 @@ public class TxConfidenceTable {
this(MAX_SIZE);
}
/**
* Get the confidence object for a transaction
* @param tx the transaction
* @return the corresponding confidence object
*/
public TransactionConfidence getConfidence(Transaction tx) {
return tx.getConfidence(this);
}
/**
* If any transactions have expired due to being only weakly reachable through us, go ahead and delete their
* table entries - it means we downloaded the transaction and sent it to various event listeners, none of

View file

@ -4502,7 +4502,7 @@ public class Wallet extends BaseTaggableObject
}
private TransactionConfidence getConfidence(Transaction tx) {
return tx.getConfidence(Context.get().getConfidenceTable());
return Context.get().getConfidenceTable().getConfidence(tx);
}
/**