mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
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:
committed by
Andreas Schildbach
parent
4b2afc9667
commit
8af0fa9884
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user