env variables. request more blocks during sync.

This commit is contained in:
Christopher Jeffrey 2016-07-24 19:02:12 -07:00
parent 6a760136a9
commit af50f5e1c6
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 14 additions and 2 deletions

View File

@ -351,6 +351,16 @@ $ node bin/node --fast
`--fast` will enable checkpoints, coin cache, and getheaders.
Some environment variables are available for quick configuration:
- `BCOIN_USE_WORKERS=1` - Enable workers for TX verification.
- `BCOIN_SEED=[host]` - Use a preferred seed node to connect to.
- `BCOIN_NETWORK=[network]` - Set the network (main, testnet, regtest, segnet3,
or segnet4).
- `BCOIN_DB=[db-name]` - Default database backend (leveldb, rocksdb, lmdb,
memory).
- `BCOIN_LOGLEVEL=[level]` - Default log level (debug, info, warning, error).
### Running a full node in the browser
``` bash

View File

@ -1607,9 +1607,11 @@ Pool.prototype._sendRequests = function _sendRequests(peer) {
else if (this.chain.height <= 150000)
size = 250;
else if (this.chain.height <= 250000)
size = 20;
size = 150;
else if (this.chain.height <= 350000)
size = 50;
else
size = 10;
size = 20;
if (this.request.activeBlocks >= size)
return;