wallet/hostlist: minor.

This commit is contained in:
Christopher Jeffrey 2017-12-06 21:17:18 -08:00
parent 417b37b0c3
commit aa3988aa2f
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 4 additions and 9 deletions

View File

@ -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.');

View File

@ -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
});

View File

@ -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')
});

View File

@ -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;