mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01: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:
parent
757e25ba9b
commit
d438caaece
1 changed files with 7 additions and 5 deletions
|
@ -1114,17 +1114,19 @@ public class Transaction extends ChildMessage implements Serializable {
|
|||
Collections.shuffle(outputs);
|
||||
}
|
||||
|
||||
/** @return the given transaction: same as getInputs().get(index). */
|
||||
public TransactionInput getInput(int index) {
|
||||
/** Same as getInputs().get(index). */
|
||||
public TransactionInput getInput(long index) {
|
||||
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();
|
||||
return outputs.get(index);
|
||||
return outputs.get((int)index);
|
||||
}
|
||||
|
||||
/** Returns the confidence object that is owned by this transaction object. */
|
||||
public synchronized TransactionConfidence getConfidence() {
|
||||
if (confidence == null) {
|
||||
confidence = new TransactionConfidence(getHash());
|
||||
|
|
Loading…
Add table
Reference in a new issue