mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Widen arg types for Transaction.getInput and getOutput so they can be fed the result of TransactionOutPoint.getIndex() directly.
This commit is contained in:
@@ -1114,17 +1114,19 @@ public class Transaction extends ChildMessage implements Serializable {
|
|||||||
Collections.shuffle(outputs);
|
Collections.shuffle(outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return the given transaction: same as getInputs().get(index). */
|
/** Same as getInputs().get(index). */
|
||||||
public TransactionInput getInput(int index) {
|
public TransactionInput getInput(long index) {
|
||||||
maybeParse();
|
maybeParse();
|
||||||
return inputs.get(index);
|
return inputs.get((int)index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransactionOutput getOutput(int index) {
|
/** Same as getOutputs().get(index) */
|
||||||
|
public TransactionOutput getOutput(long index) {
|
||||||
maybeParse();
|
maybeParse();
|
||||||
return outputs.get(index);
|
return outputs.get((int)index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the confidence object that is owned by this transaction object. */
|
||||||
public synchronized TransactionConfidence getConfidence() {
|
public synchronized TransactionConfidence getConfidence() {
|
||||||
if (confidence == null) {
|
if (confidence == null) {
|
||||||
confidence = new TransactionConfidence(getHash());
|
confidence = new TransactionConfidence(getHash());
|
||||||
|
Reference in New Issue
Block a user