From e9c777c9a6f5f83043aade6f84d35ff100a576af Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Mon, 23 Jun 2014 15:23:08 +0200 Subject: [PATCH] Explain why a transaction output value is kept as a long rather than Coin. --- .../java/com/google/bitcoin/core/TransactionOutput.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java b/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java index 65da90dc..5290fc0d 100644 --- a/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java +++ b/core/src/main/java/com/google/bitcoin/core/TransactionOutput.java @@ -42,9 +42,11 @@ public class TransactionOutput extends ChildMessage implements Serializable { private static final Logger log = LoggerFactory.getLogger(TransactionOutput.class); private static final long serialVersionUID = -590332479859256824L; - // A transaction output has some value and a script used for authenticating that the redeemer is allowed to spend - // this output. + // The output's value is kept as a native type in order to save class instances. private long value; + + // A transaction output has a script used for authenticating that the redeemer is allowed to spend + // this output. private byte[] scriptBytes; // The script bytes are parsed and turned into a Script on demand.