wallet/hostlist: minor.
This commit is contained in:
parent
417b37b0c3
commit
aa3988aa2f
@ -1070,6 +1070,7 @@ class HostList {
|
||||
|
||||
return {
|
||||
version: HostList.VERSION,
|
||||
network: this.network.type,
|
||||
addrs: addrs,
|
||||
fresh: fresh,
|
||||
used: used
|
||||
@ -1094,6 +1095,9 @@ class HostList {
|
||||
|
||||
assert(json && typeof json === 'object');
|
||||
|
||||
assert(!json.network || json.network === this.network.type,
|
||||
'Network mistmatch.');
|
||||
|
||||
assert(json.version === HostList.VERSION,
|
||||
'Bad address serialization version.');
|
||||
|
||||
|
||||
@ -52,7 +52,6 @@ class Plugin extends EventEmitter {
|
||||
cacheSize: config.mb('wallet-cache-size'),
|
||||
witness: config.bool('wallet-witness'),
|
||||
checkpoints: config.bool('wallet-checkpoints'),
|
||||
startHeight: config.uint('wallet-start-height'),
|
||||
wipeNoReally: config.bool('wallet-wipe-no-really'),
|
||||
spv: node.spv
|
||||
});
|
||||
|
||||
@ -50,7 +50,6 @@ class WalletNode extends Node {
|
||||
cacheSize: this.config.mb('cache-size'),
|
||||
witness: this.config.bool('witness'),
|
||||
checkpoints: this.config.bool('checkpoints'),
|
||||
startHeight: this.config.uint('start-height'),
|
||||
wipeNoReally: this.config.bool('wipe-no-really'),
|
||||
spv: this.config.bool('spv')
|
||||
});
|
||||
|
||||
@ -2146,7 +2146,6 @@ class WalletOptions {
|
||||
this.spv = false;
|
||||
this.witness = false;
|
||||
this.checkpoints = false;
|
||||
this.startHeight = 0;
|
||||
this.wipeNoReally = false;
|
||||
|
||||
if (options)
|
||||
@ -2230,12 +2229,6 @@ class WalletOptions {
|
||||
this.checkpoints = options.checkpoints;
|
||||
}
|
||||
|
||||
if (options.startHeight != null) {
|
||||
assert(typeof options.startHeight === 'number');
|
||||
assert(options.startHeight >= 0);
|
||||
this.startHeight = options.startHeight;
|
||||
}
|
||||
|
||||
if (options.wipeNoReally != null) {
|
||||
assert(typeof options.wipeNoReally === 'boolean');
|
||||
this.wipeNoReally = options.wipeNoReally;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user