improve pool/chain options.
This commit is contained in:
parent
90856a8f5b
commit
eee2ef5d34
@ -556,8 +556,6 @@ Chain.prototype.getLast = function getLast(cb) {
|
||||
};
|
||||
|
||||
Chain.prototype.getStartHeight = function getStartHeight() {
|
||||
if (this.options.startHeight != null)
|
||||
return this.options.startHeight;
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
@ -32,9 +32,7 @@ function Pool(options) {
|
||||
network.set(this.options.network);
|
||||
|
||||
this.options.fullNode = !!this.options.fullNode;
|
||||
this.options.relay == null
|
||||
? (this.options.fullNode ? false : true)
|
||||
: this.options.relay;
|
||||
this.options.relay = this.options.relay !== false;
|
||||
this.storage = this.options.storage;
|
||||
this.destroyed = false;
|
||||
this.size = options.size || 32;
|
||||
@ -73,9 +71,7 @@ function Pool(options) {
|
||||
: bcoin.spvChain;
|
||||
|
||||
this.chain = new Chain({
|
||||
storage: this.storage,
|
||||
fullNode: this.options.fullNode,
|
||||
startHeight: this.options.startHeight
|
||||
storage: this.storage
|
||||
});
|
||||
|
||||
this.watchMap = {};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user