@Override public void setDepthInBlocks(int depthInBlocks) { tx.getConfidence().setDepthInBlocks(depthInBlocks); }
@Override public void setDepthInBlocks(int depthInBlocks) { tx.getConfidence().setDepthInBlocks(depthInBlocks); }
/** * Subtract the supplied depth from the given transactions. */ private void subtractDepth(int depthToSubtract, Collection<Transaction> transactions) { for (Transaction tx : transactions) { if (tx.getConfidence().getConfidenceType() == ConfidenceType.BUILDING) { tx.getConfidence().setDepthInBlocks(tx.getConfidence().getDepthInBlocks() - depthToSubtract); confidenceChanged.put(tx, TransactionConfidence.Listener.ChangeReason.DEPTH); } } }
/** * Subtract the supplied depth from the given transactions. */ private void subtractDepth(int depthToSubtract, Collection<Transaction> transactions) { for (Transaction tx : transactions) { if (tx.getConfidence().getConfidenceType() == ConfidenceType.BUILDING) { tx.getConfidence().setDepthInBlocks(tx.getConfidence().getDepthInBlocks() - depthToSubtract); confidenceChanged.put(tx, TransactionConfidence.Listener.ChangeReason.DEPTH); } } }
/** * Subtract the supplied depth from the given transactions. */ private void subtractDepth(int depthToSubtract, Collection<Transaction> transactions) { for (Transaction tx : transactions) { if (tx.getConfidence().getConfidenceType() == ConfidenceType.BUILDING) { tx.getConfidence().setDepthInBlocks(tx.getConfidence().getDepthInBlocks() - depthToSubtract); confidenceChanged.put(tx, TransactionConfidence.Listener.ChangeReason.DEPTH); } } }
/** * Subtract the supplied depth from the given transactions. */ private void subtractDepth(int depthToSubtract, Collection<Transaction> transactions) { for (Transaction tx : transactions) { if (tx.getConfidence().getConfidenceType() == ConfidenceType.BUILDING) { tx.getConfidence().setDepthInBlocks(tx.getConfidence().getDepthInBlocks() - depthToSubtract); confidenceChanged.put(tx, TransactionConfidence.Listener.ChangeReason.DEPTH); } } }
@Override public Transaction getTransaction (Sha256Hash hash) { try { Transaction transaction = blockExplorer.getBitcoinJTransaction(hash.toString()); double height = blockExplorer.getTransaction(hash.toString()).getBlockHeight(); if (height > 0) { transaction.getConfidence().setDepthInBlocks((int) (blockChain.getChainHead().getHeight() - height)); } return transaction; } catch (Exception e) { throw new RuntimeException(e); } }
return; confidence.setDepthInBlocks(confidenceProto.getDepth());
return; confidence.setDepthInBlocks(confidenceProto.getDepth());
return; confidence.setDepthInBlocks(confidenceProto.getDepth());
return; confidence.setDepthInBlocks(confidenceProto.getDepth());
return; confidence.setDepthInBlocks(confidenceProto.getDepth());
if (txConf.getConfidenceType() == BUILDING) { txConf.setAppearedAtChainHeight(fullTxConf.getAppearedAtChainHeight()); txConf.setDepthInBlocks(fullTxConf.getDepthInBlocks());
if (txConf.getConfidenceType() == BUILDING) { txConf.setAppearedAtChainHeight(fullTxConf.getAppearedAtChainHeight()); txConf.setDepthInBlocks(fullTxConf.getDepthInBlocks());
return; confidence.setDepthInBlocks(confidenceProto.getDepth());