3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 23:03:04 +00:00

Allow modification of the inputs/outputs list.

This commit is contained in:
Mike Hearn 2013-04-12 11:09:59 +02:00
parent d14ac586d7
commit dd4d237cd9

View File

@ -936,6 +936,7 @@ public class Transaction extends ChildMessage implements Serializable {
*/
public void setLockTime(long lockTime) {
unCache();
// TODO: Consider checking that at least one input has a non-final sequence number.
this.lockTime = lockTime;
}
@ -947,20 +948,16 @@ public class Transaction extends ChildMessage implements Serializable {
return version;
}
/**
* @return a read-only list of the inputs of this transaction.
*/
/** Returns a modifiable list of all inputs. */
public List<TransactionInput> getInputs() {
maybeParse();
return Collections.unmodifiableList(inputs);
return inputs;
}
/**
* @return a read-only list of the outputs of this transaction.
*/
/** Returns a modifiable list of all outputs. */
public List<TransactionOutput> getOutputs() {
maybeParse();
return Collections.unmodifiableList(outputs);
return outputs;
}
/** @return the given transaction: same as getInputs().get(index). */