TransactionInput input = new TransactionInput(params, t, new byte[]{}, prevOut.outpoint);
input.setSequenceNumber(sequence);
t.addInput(input);
if (prevOut.scriptPubKey.getChunks().get(0).equalsOpCode(OP_TRUE)) {
input.setScriptSig(new ScriptBuilder().op(OP_1).build());
} else {
// Sign input
checkState(prevOut.scriptPubKey.isSentToRawPubKey());
Sha256Hash hash = t.hashForSignature(0, prevOut.scriptPubKey, SigHash.ALL, false);
input.setScriptSig(ScriptBuilder.createInputScript(