bitcoind: add checkstate for spentindex

This commit is contained in:
Braydon Fuller 2016-04-12 15:36:59 -04:00
parent cdfe572344
commit c36b0777d4

View File

@ -201,6 +201,13 @@ Bitcoin.prototype._loadSpawnConfiguration = function(node) {
'necessary with reindex=1'
);
$.checkState(
spawnConfig.spentindex && spawnConfig.spentindex === 1,
'"spentindex" option is required in order to use spent info query features of bitcore-node. ' +
'Please add "spentindex=1" to your configuration and reindex an existing database if ' +
'necessary with reindex=1'
);
$.checkState(
spawnConfig.server && spawnConfig.server === 1,
'"server" option is required to communicate to bitcoind from bitcore. ' +