mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 10:45:51 +00:00
Wallet: minor tweaks to setUTXOProvider
This commit is contained in:
parent
153d323ccf
commit
6836d4816d
@ -3968,20 +3968,17 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
|
|||||||
/**
|
/**
|
||||||
* Set the {@link UTXOProvider}.
|
* Set the {@link UTXOProvider}.
|
||||||
*
|
*
|
||||||
* <p>The wallet will query the provider for the spendable candidates.
|
* <p>The wallet will query the provider for spendable candidates, i.e. outputs controlled exclusively
|
||||||
* The spendable candidates are the outputs controlled exclusively
|
|
||||||
* by private keys contained in the wallet.</p>
|
* by private keys contained in the wallet.</p>
|
||||||
*
|
*
|
||||||
* <p>Note that the associated provider must be reattached after a wallet is loaded from disk.
|
* <p>Note that the associated provider must be reattached after a wallet is loaded from disk.
|
||||||
* The association is not serialized.</p>
|
* The association is not serialized.</p>
|
||||||
*
|
|
||||||
* @param vUTXOProvider The UTXO provider.
|
|
||||||
*/
|
*/
|
||||||
public void setUTXOProvider(@Nullable UTXOProvider vUTXOProvider) {
|
public void setUTXOProvider(@Nullable UTXOProvider provider) {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
checkArgument(vUTXOProvider == null ? true : vUTXOProvider.getParams().equals(params));
|
checkArgument(provider == null || provider.getParams().equals(params));
|
||||||
this.vUTXOProvider = vUTXOProvider;
|
this.vUTXOProvider = provider;
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user