mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 14:40:40 +01:00
TransactionInput: remove helper duplicateDetached()
It is only used from a test, and that test works just as well by just copying the reference.
This commit is contained in:
parent
81adac9f1e
commit
a3f82d6bae
2 changed files with 1 additions and 6 deletions
|
@ -496,11 +496,6 @@ public class TransactionInput extends Message {
|
||||||
return getOutpoint().fromTx;
|
return getOutpoint().fromTx;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns a copy of the input detached from its containing transaction, if need be. */
|
|
||||||
public TransactionInput duplicateDetached() {
|
|
||||||
return new TransactionInput(null, ByteBuffer.wrap(bitcoinSerialize()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Returns either RuleViolation.NONE if the input is standard, or which rule makes it non-standard if so.
|
* <p>Returns either RuleViolation.NONE if the input is standard, or which rule makes it non-standard if so.
|
||||||
* The "IsStandard" rules control whether the default Bitcoin Core client blocks relay of a tx / refuses to mine it,
|
* The "IsStandard" rules control whether the default Bitcoin Core client blocks relay of a tx / refuses to mine it,
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class TransactionTest {
|
||||||
public void duplicateOutPoint() {
|
public void duplicateOutPoint() {
|
||||||
TransactionInput input = tx.getInput(0);
|
TransactionInput input = tx.getInput(0);
|
||||||
input.setScriptBytes(new byte[1]);
|
input.setScriptBytes(new byte[1]);
|
||||||
tx.addInput(input.duplicateDetached());
|
tx.addInput(input);
|
||||||
tx.verify();
|
tx.verify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue