diff --git a/core/src/main/java/org/bitcoinj/core/Wallet.java b/core/src/main/java/org/bitcoinj/core/Wallet.java index 51f256ac..12bda904 100644 --- a/core/src/main/java/org/bitcoinj/core/Wallet.java +++ b/core/src/main/java/org/bitcoinj/core/Wallet.java @@ -3968,20 +3968,17 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha /** * Set the {@link UTXOProvider}. * - *

The wallet will query the provider for the spendable candidates. - * The spendable candidates are the outputs controlled exclusively + *

The wallet will query the provider for spendable candidates, i.e. outputs controlled exclusively * by private keys contained in the wallet.

* *

Note that the associated provider must be reattached after a wallet is loaded from disk. * The association is not serialized.

- * - * @param vUTXOProvider The UTXO provider. */ - public void setUTXOProvider(@Nullable UTXOProvider vUTXOProvider) { + public void setUTXOProvider(@Nullable UTXOProvider provider) { lock.lock(); try { - checkArgument(vUTXOProvider == null ? true : vUTXOProvider.getParams().equals(params)); - this.vUTXOProvider = vUTXOProvider; + checkArgument(provider == null || provider.getParams().equals(params)); + this.vUTXOProvider = provider; } finally { lock.unlock(); }