diff --git a/lib/net/hostlist.js b/lib/net/hostlist.js index 64bd0dc5..a5b9e213 100644 --- a/lib/net/hostlist.js +++ b/lib/net/hostlist.js @@ -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.'); diff --git a/lib/wallet/plugin.js b/lib/wallet/plugin.js index b2fbb870..31046d39 100644 --- a/lib/wallet/plugin.js +++ b/lib/wallet/plugin.js @@ -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 }); diff --git a/lib/wallet/server.js b/lib/wallet/server.js index 2cd97f21..9f37d4f5 100644 --- a/lib/wallet/server.js +++ b/lib/wallet/server.js @@ -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') }); diff --git a/lib/wallet/walletdb.js b/lib/wallet/walletdb.js index b259bbf8..f00a41b1 100644 --- a/lib/wallet/walletdb.js +++ b/lib/wallet/walletdb.js @@ -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;