3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00

Add logging for output disconnection and reconnection.

This commit is contained in:
Mike Hearn 2014-07-22 16:04:26 +02:00
parent 92544e9d47
commit 626117bc29

View File

@ -233,12 +233,20 @@ public class TransactionOutput extends ChildMessage implements Serializable {
checkState(availableForSpending);
availableForSpending = false;
spentBy = input;
if (parentTransaction != null)
log.info("Marked {}:{} as spent by {}", parentTransaction.getHash(), getIndex(), input);
else
log.info("Marked floating output as spent by {}", input);
}
/**
* Resets the spent pointer / availableForSpending flag to null.
*/
public void markAsUnspent() {
if (parentTransaction != null)
log.info("Un-marked {}:{} as spent by {}", parentTransaction.getHash(), getIndex(), spentBy);
else
log.info("Un-marked floating output as spent by {}", spentBy);
availableForSpending = true;
spentBy = null;
}