3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 10:45:51 +00:00

UTXO re-formatted

This commit is contained in:
Loco 2015-04-29 13:17:28 +03:00 committed by Mike Hearn
parent bee1873e1a
commit e214f27963

View File

@ -39,19 +39,30 @@ public class UTXO implements Serializable {
private Coin value;
private Script script;
/** Hash of the transaction to which we refer. */
/**
* Hash of the transaction to which we refer.
*/
private Sha256Hash hash;
/** Which output of that transaction we are talking about. */
/**
* Which output of that transaction we are talking about.
*/
private long index;
/** The height of the tx of this output */
/**
* The height of the tx of this output
*/
private int height;
/** If this output is from a coinbase tx */
/**
* If this output is from a coinbase tx
*/
private boolean coinbase;
/** The address of this output */
/**
* The address of this output
*/
private String address;
/**
* Creates a stored transaction output.
*
* @param hash The hash of the containing transaction.
* @param index The outpoint.
* @param value The value available.
@ -75,6 +86,7 @@ public class UTXO implements Serializable {
/**
* Creates a stored transaction output.
*
* @param hash The hash of the containing transaction.
* @param index The outpoint.
* @param value The value available.
@ -134,6 +146,7 @@ public class UTXO implements Serializable {
/**
* The value which this Transaction output holds.
*
* @return the value.
*/
public Coin getValue() {
@ -142,6 +155,7 @@ public class UTXO implements Serializable {
/**
* The Script object which you can use to get address, script bytes or script type.
*
* @return the script.
*/
public Script getScript() {
@ -150,6 +164,7 @@ public class UTXO implements Serializable {
/**
* The hash of the transaction which holds this output.
*
* @return the hash.
*/
public Sha256Hash getHash() {
@ -158,6 +173,7 @@ public class UTXO implements Serializable {
/**
* The index of this output in the transaction which holds it.
*
* @return the index.
*/
public long getIndex() {
@ -166,6 +182,7 @@ public class UTXO implements Serializable {
/**
* Gets the height of the block that created this output.
*
* @return The height.
*/
public int getHeight() {
@ -174,6 +191,7 @@ public class UTXO implements Serializable {
/**
* Gets the flag of whether this was created by a coinbase tx.
*
* @return The coinbase flag.
*/
public boolean isCoinbase() {
@ -182,6 +200,7 @@ public class UTXO implements Serializable {
/**
* The address of this output.
*
* @return The address.
*/
public String getAddress() {