mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 10:15:52 +00:00
Allow modification of the inputs/outputs list.
This commit is contained in:
parent
d14ac586d7
commit
dd4d237cd9
@ -936,6 +936,7 @@ public class Transaction extends ChildMessage implements Serializable {
|
|||||||
*/
|
*/
|
||||||
public void setLockTime(long lockTime) {
|
public void setLockTime(long lockTime) {
|
||||||
unCache();
|
unCache();
|
||||||
|
// TODO: Consider checking that at least one input has a non-final sequence number.
|
||||||
this.lockTime = lockTime;
|
this.lockTime = lockTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -947,20 +948,16 @@ public class Transaction extends ChildMessage implements Serializable {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Returns a modifiable list of all inputs. */
|
||||||
* @return a read-only list of the inputs of this transaction.
|
|
||||||
*/
|
|
||||||
public List<TransactionInput> getInputs() {
|
public List<TransactionInput> getInputs() {
|
||||||
maybeParse();
|
maybeParse();
|
||||||
return Collections.unmodifiableList(inputs);
|
return inputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Returns a modifiable list of all outputs. */
|
||||||
* @return a read-only list of the outputs of this transaction.
|
|
||||||
*/
|
|
||||||
public List<TransactionOutput> getOutputs() {
|
public List<TransactionOutput> getOutputs() {
|
||||||
maybeParse();
|
maybeParse();
|
||||||
return Collections.unmodifiableList(outputs);
|
return outputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the given transaction: same as getInputs().get(index). */
|
/** @return the given transaction: same as getInputs().get(index). */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user