Android Open Source - My-Wallet-Android My Transaction Confidence

From Project

Back to project page My-Wallet-Android.


The source code is released under:

GNU General Public License

If you think the Android project My-Wallet-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package piuk;
//from   ww  w  .  j a  v a2  s  . co  m

public class MyTransactionConfidence extends TransactionConfidence {
  private static final long serialVersionUID = 1L;
  int height;
  boolean double_spend;
  public MyTransactionConfidence(Transaction tx, int height, boolean double_spend) {
    this.height = height;
    this.double_spend = double_spend;
  public synchronized int getAppearedAtChainHeight() {
      return height;

  public synchronized void setAppearedAtChainHeight(int appearedAtChainHeight) {
      this.height = appearedAtChainHeight;
  public synchronized ConfidenceType getConfidenceType() {
        if (height == 0)
          return ConfidenceType.NOT_SEEN_IN_CHAIN;
        else if (double_spend)
            return ConfidenceType.OVERRIDDEN_BY_DOUBLE_SPEND;
        else if (height > 0)
          return ConfidenceType.BUILDING;
          return ConfidenceType.UNKNOWN;

Java Source Code List