Commit b55d0f65 authored by Daniel Connolly's avatar Daniel Connolly

correct spending tx in data driven tests

parent 844deee2
......@@ -93,9 +93,9 @@ public class ScriptHelpers {
Transaction transaction = new Transaction(unitTestParameters);
transaction.setVersion(1);
transaction.setLockTime(0);
transaction.addInput(new TransactionInput(unitTestParameters,null,
transaction.addInput(new TransactionInput(unitTestParameters, transaction,
new ScriptBuilder().number(0).number(0).build().getProgram()));
transaction.addOutput(new TransactionOutput(unitTestParameters, null, value, scriptPubKey.getProgram()));
transaction.addOutput(new TransactionOutput(unitTestParameters, transaction, value, scriptPubKey.getProgram()));
return transaction;
}
......@@ -104,10 +104,10 @@ public class ScriptHelpers {
Transaction txSpend = new Transaction(unitTestParameters);
txSpend.setVersion(1);
txSpend.setLockTime(0);
txSpend.addInput(new TransactionInput(unitTestParameters, null, scriptSig.getProgram(),
txSpend.addInput(new TransactionInput(unitTestParameters, txSpend, scriptSig.getProgram(),
new TransactionOutPoint(unitTestParameters, txCredit.getOutput(0))));
txSpend.addOutput(new TransactionOutput(unitTestParameters, null, txCredit.getOutput(0).getValue(),
new ScriptBuilder().number(0).number(0).build().getProgram()));
txSpend.addOutput(new TransactionOutput(unitTestParameters, txSpend, txCredit.getOutput(0).getValue(),
new ScriptBuilder().build().getProgram()));
return txSpend;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment