mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
TxConfidenceTable: new method getConfidence(Transaction)
Use it in `Wallet`.
This commit is contained in:
parent
dfcaa97b6e
commit
5ff114b7b8
2 changed files with 10 additions and 1 deletions
|
@ -92,6 +92,15 @@ public class TxConfidenceTable {
|
||||||
this(MAX_SIZE);
|
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
|
* 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
|
* table entries - it means we downloaded the transaction and sent it to various event listeners, none of
|
||||||
|
|
|
@ -4502,7 +4502,7 @@ public class Wallet extends BaseTaggableObject
|
||||||
}
|
}
|
||||||
|
|
||||||
private TransactionConfidence getConfidence(Transaction tx) {
|
private TransactionConfidence getConfidence(Transaction tx) {
|
||||||
return tx.getConfidence(Context.get().getConfidenceTable());
|
return Context.get().getConfidenceTable().getConfidence(tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue