From 67517be6d4c26d63436c4f0d41b31f4085b4dcef Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Wed, 10 May 2017 15:45:37 -0400 Subject: [PATCH] wip --- regtest/db.js | 10 +++++++--- regtest/wallet.js | 9 ++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/regtest/db.js b/regtest/db.js index 1c0dae3f..96c2b9ae 100644 --- a/regtest/db.js +++ b/regtest/db.js @@ -132,9 +132,13 @@ describe('DB Operations', function() { req.on('end', function() { var body = JSON.parse(data); - //console.log('request', body); + if (debug) { + console.log('request', body); + } var response = JSON.stringify({ result: responses[responseCount++] }); - //console.log('response', response, 'id: ', body.id); + if (debug) { + console.log('response', response, 'id: ', body.id); + } res.write(response); res.end(); }); @@ -204,7 +208,7 @@ function publishBlockHash(blockHash, callback) { return callback(err); } - blockHash.should.equal(JSON.parse(res).hash); + blockHash.should.equal(JSON.parse(res).dbhash); callback(); }); diff --git a/regtest/wallet.js b/regtest/wallet.js index 4bec09d6..73d7fe7a 100644 --- a/regtest/wallet.js +++ b/regtest/wallet.js @@ -24,6 +24,7 @@ var rpcConfig = { var bitcoin = { args: { datadir: bitcoinDataDir, + txindex: 1, listen: 0, regtest: 1, server: 1, @@ -192,7 +193,13 @@ describe('Wallet Operations', function() { it('should get list of transactions', function(done) { - utils.getListOfTxs.call(utils, self.opts, done); + utils.waitForBitcoreNode(self.opts, function(err) { + + if(err) { + return done(err); + } + utils.getListOfTxs.call(utils, self.opts, done); + }); });