Implemented version 2 of payment channels API

I implemented version 2 of the payment channels API using
OP_CHECKLOCKTIMEVERIFY-style payment channels.
This commit is contained in:
Will Shackleton
2015-11-22 15:53:23 +00:00
committed by Andreas Schildbach
parent 4b2afc9667
commit 8af0fa9884
28 changed files with 2993 additions and 781 deletions

View File

@@ -724,7 +724,7 @@ public class WalletTool {
throw new RuntimeException(e);
}
Wallet.SendRequest req = Wallet.SendRequest.toCLTVPaymentChannel(params, lockTime, refundKey, outputKey, value);
Wallet.SendRequest req = Wallet.SendRequest.toCLTVPaymentChannel(params, BigInteger.valueOf(lockTime), refundKey, outputKey, value);
if (req.tx.getOutputs().size() == 1 && req.tx.getOutput(0).getValue().equals(wallet.getBalance())) {
log.info("Emptying out wallet, recipient may get less than what you expect");
req.emptyWallet = true;