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