From c36b0777d48c6e575e4393047b022b898d429b1b Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 12 Apr 2016 15:36:59 -0400 Subject: [PATCH] bitcoind: add checkstate for spentindex --- lib/services/bitcoind.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/services/bitcoind.js b/lib/services/bitcoind.js index f935e826..be30eb02 100644 --- a/lib/services/bitcoind.js +++ b/lib/services/bitcoind.js @@ -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. ' +