mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Wallet: Check early for null context or params.
This commit is contained in:
@@ -348,8 +348,8 @@ public class Wallet extends BaseTaggableObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Wallet(Context context, KeyChainGroup keyChainGroup) {
|
private Wallet(Context context, KeyChainGroup keyChainGroup) {
|
||||||
this.context = context;
|
this.context = checkNotNull(context);
|
||||||
this.params = context.getParams();
|
this.params = checkNotNull(context.getParams());
|
||||||
this.keyChainGroup = checkNotNull(keyChainGroup);
|
this.keyChainGroup = checkNotNull(keyChainGroup);
|
||||||
if (params.getId().equals(NetworkParameters.ID_UNITTESTNET))
|
if (params.getId().equals(NetworkParameters.ID_UNITTESTNET))
|
||||||
this.keyChainGroup.setLookaheadSize(5); // Cut down excess computation for unit tests.
|
this.keyChainGroup.setLookaheadSize(5); // Cut down excess computation for unit tests.
|
||||||
|
Reference in New Issue
Block a user