@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionOutput other = (TransactionOutput) o; return value == other.value && (parent == null || (parent == other.parent && getIndex() == other.getIndex())) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionOutput other = (TransactionOutput) o; return value == other.value && (parent == null || (parent == other.parent && getIndex() == other.getIndex())) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionOutput other = (TransactionOutput) o; return value == other.value && (parent == null || (parent == other.parent && getIndex() == other.getIndex())) && Arrays.equals(scriptBytes, other.scriptBytes); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TransactionOutput other = (TransactionOutput) o; return value == other.value && (parent == null || (parent == other.parent && getIndex() == other.getIndex())) && Arrays.equals(scriptBytes, other.scriptBytes); }
/** * Resets the spent pointer / availableForSpending flag to null. */ public void markAsUnspent() { if (parent != null) if (log.isDebugEnabled()) log.debug("Un-marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), spentBy); else if (log.isDebugEnabled()) log.debug("Un-marked floating output as spent by {}", spentBy); availableForSpending = true; spentBy = null; }
/** * Resets the spent pointer / availableForSpending flag to null. */ public void markAsUnspent() { if (parent != null) if (log.isDebugEnabled()) log.debug("Un-marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), spentBy); else if (log.isDebugEnabled()) log.debug("Un-marked floating output as spent by {}", spentBy); availableForSpending = true; spentBy = null; }
/** * Resets the spent pointer / availableForSpending flag to null. */ public void markAsUnspent() { if (parent != null) if (log.isDebugEnabled()) log.debug("Un-marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), spentBy); else if (log.isDebugEnabled()) log.debug("Un-marked floating output as spent by {}", spentBy); availableForSpending = true; spentBy = null; }
/** * Resets the spent pointer / availableForSpending flag to null. */ public void markAsUnspent() { if (parent != null) if (log.isDebugEnabled()) log.debug("Un-marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), spentBy); else if (log.isDebugEnabled()) log.debug("Un-marked floating output as spent by {}", spentBy); availableForSpending = true; spentBy = null; }
public TransactionOutPoint(NetworkParameters params, TransactionOutput connectedOutput) { this(params, connectedOutput.getIndex(), connectedOutput.getParentTransactionHash()); this.connectedOutput = connectedOutput; }
public TransactionOutPoint(NetworkParameters params, TransactionOutput connectedOutput) { this(params, connectedOutput.getIndex(), connectedOutput.getParentTransactionHash()); this.connectedOutput = connectedOutput; }
/** * Sets this objects availableForSpending flag to false and the spentBy pointer to the given input. * If the input is null, it means this output was signed over to somebody else rather than one of our own keys. * @throws IllegalStateException if the transaction was already marked as spent. */ public void markAsSpent(TransactionInput input) { checkState(availableForSpending); availableForSpending = false; spentBy = input; if (parent != null) if (log.isDebugEnabled()) log.debug("Marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), input); else if (log.isDebugEnabled()) log.debug("Marked floating output as spent by {}", input); }
/** * Sets this objects availableForSpending flag to false and the spentBy pointer to the given input. * If the input is null, it means this output was signed over to somebody else rather than one of our own keys. * @throws IllegalStateException if the transaction was already marked as spent. */ public void markAsSpent(TransactionInput input) { checkState(availableForSpending); availableForSpending = false; spentBy = input; if (parent != null) if (log.isDebugEnabled()) log.debug("Marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), input); else if (log.isDebugEnabled()) log.debug("Marked floating output as spent by {}", input); }
public TransactionOutPoint(NetworkParameters params, TransactionOutput connectedOutput) { this(params, connectedOutput.getIndex(), connectedOutput.getParentTransactionHash()); this.connectedOutput = connectedOutput; }
/** * Sets this objects availableForSpending flag to false and the spentBy pointer to the given input. * If the input is null, it means this output was signed over to somebody else rather than one of our own keys. * @throws IllegalStateException if the transaction was already marked as spent. */ public void markAsSpent(TransactionInput input) { checkState(availableForSpending); availableForSpending = false; spentBy = input; if (parent != null) if (log.isDebugEnabled()) log.debug("Marked {}:{} as spent by {}", getParentTransactionHash(), getIndex(), input); else if (log.isDebugEnabled()) log.debug("Marked floating output as spent by {}", input); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
public TransactionOutPoint(NetworkParameters params, TransactionOutput connectedOutput) { this( params, connectedOutput.getIndex(), connectedOutput.getParentTransactionHash(), connectedOutput.getValue()); this.connectedOutput = connectedOutput; }
@Override public String getTransactionId() throws MissingTransactionInformationException { try { Transaction transaction = bitcoinjTxOutput.getParentTransaction(); return transaction.getHashAsString() + "_" + String.valueOf(bitcoinjTxOutput.getIndex()); } catch (Exception e) { throw new MissingTransactionInformationException("Couldn't fetch transaction id.", e); } }