mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-25 15:10:18 +01:00
Payment channels: more informative exception message if you forget to add the client wallet extension.
This commit is contained in:
parent
85554f511f
commit
baeaa64201
1 changed files with 1 additions and 0 deletions
|
@ -376,6 +376,7 @@ public class PaymentChannelClientState {
|
|||
@VisibleForTesting synchronized void doStoreChannelInWallet(Sha256Hash id) {
|
||||
StoredPaymentChannelClientStates channels = (StoredPaymentChannelClientStates)
|
||||
wallet.getExtensions().get(StoredPaymentChannelClientStates.EXTENSION_ID);
|
||||
checkNotNull(channels, "You have not added the StoredPaymentChannelClientStates extension to the wallet.");
|
||||
checkState(channels.getChannel(id, multisigContract.getHash()) == null);
|
||||
storedChannel = new StoredClientChannel(id, multisigContract, refundTx, myKey, valueToMe, refundFees, true);
|
||||
channels.putChannel(storedChannel);
|
||||
|
|
Loading…
Add table
Reference in a new issue