node: add bip151 option.

This commit is contained in:
Christopher Jeffrey 2016-07-25 18:26:29 -07:00
parent b455352708
commit a86a374ca5
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,8 @@ var node = new bcoin.fullnode({
coinCache: fast || process.argv.indexOf('--coin-cache') !== -1,
selfish: process.argv.indexOf('--selfish') !== -1,
headers: fast || process.argv.indexOf('--headers') !== -1,
parallel: process.argv.indexOf('--parallel') !== -1
parallel: process.argv.indexOf('--parallel') !== -1,
bip151: process.argv.indexOf('--bip151') !== -1
});
node.on('error', function(err) {

View File

@ -11,7 +11,8 @@ var node = bcoin.spvnode({
logFile: true,
db: 'leveldb',
useCheckpoints: process.argv.indexOf('--checkpoints') !== -1,
headers: process.argv.indexOf('--headers') !== -1
headers: process.argv.indexOf('--headers') !== -1,
bip151: process.argv.indexOf('--bip151') !== -1
});
node.on('error', function(err) {

View File

@ -98,6 +98,7 @@ function Fullnode(options) {
selfish: this.options.selfish,
headers: this.options.headers,
compact: this.options.compact,
bip151: this.options.bip151,
proxyServer: this.options.proxyServer,
preferredSeed: this.options.preferredSeed,
spv: false

View File

@ -112,7 +112,7 @@ function Peer(pool, options) {
this.sentAddr = false;
this.bip151 = null;
if (options.bip151)
if (this.pool.options.bip151)
this.bip151 = new bcoin.bip151();
this.challenge = null;