From d773e0c5f92297b260c2ce5a3aca9fe03fc6e1af Mon Sep 17 00:00:00 2001 From: Alex Werner Date: Wed, 30 May 2018 02:17:58 +0200 Subject: [PATCH] Small fixes --- README.md | 11 +++++++++-- lib/services/dashd.js | 9 +++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 20c2c6c92..44f89a0c6 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,15 @@ If it doesn't exist, it will create it, with basic task to connect to dashd. Some plugins are available : -- Insight-API : -- Insight-UI (require insight-API) : +- Insight-API : `./bin/dashcore-node addservice @dashevo/insight-api +- Insight-UI : `./bin/dashcore-node addservice @dashevo/insight-ui` + +You also might want to add these index to your dash.conf file : +``` +-addressindex +-timestampindex +-spentindex +``` ### As a library diff --git a/lib/services/dashd.js b/lib/services/dashd.js index 315106f34..d65f37550 100644 --- a/lib/services/dashd.js +++ b/lib/services/dashd.js @@ -261,10 +261,11 @@ Dash.prototype.subscribeAddress = function(emitter, addresses) { self.subscriptions.address[addressStr] = [emitter]; } } - - for(var i = 0; i < addresses.length; i++) { - if (dashcore.Address.isValid(addresses[i], this.node.network)) { - addAddress(addresses[i]); + if(addresses){ + for(var i = 0; i < addresses.length; i++) { + if (dashcore.Address.isValid(addresses[i], this.node.network)) { + addAddress(addresses[i]); + } } }