From c8ba4eaa8f9a77499d150540975ec9905f8a2d14 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 18 Apr 2016 13:45:06 -0400 Subject: [PATCH] test: remove outdated regtest --- regtest/node.js | 78 ------------------------------------------------- 1 file changed, 78 deletions(-) diff --git a/regtest/node.js b/regtest/node.js index 7fa59ad4..368fa2a6 100644 --- a/regtest/node.js +++ b/regtest/node.js @@ -116,84 +116,6 @@ describe('Node Functionality', function() { }); }); - var invalidatedBlockHash; - - it.skip('will handle a reorganization', function(done) { - - var count; - var blockHash; - - async.series([ - function(next) { - client.getBlockCount(function(err, response) { - if (err) { - return next(err); - } - count = response.result; - next(); - }); - }, - function(next) { - client.getBlockHash(count, function(err, response) { - if (err) { - return next(err); - } - invalidatedBlockHash = response.result; - next(); - }); - }, - function(next) { - client.invalidateBlock(invalidatedBlockHash, next); - }, - function(next) { - client.getBlockCount(function(err, response) { - if (err) { - return next(err); - } - response.result.should.equal(count - 1); - next(); - }); - } - ], function(err) { - if (err) { - throw err; - } - var blocksRemoved = 0; - var blocksAdded = 0; - - var removeBlock = function() { - blocksRemoved++; - }; - - node.services.db.on('removeblock', removeBlock); - - var addBlock = function() { - blocksAdded++; - if (blocksAdded === 2 && blocksRemoved === 1) { - node.services.db.removeListener('addblock', addBlock); - node.services.db.removeListener('removeblock', removeBlock); - done(); - } - }; - - node.services.db.on('addblock', addBlock); - - // We need to add a transaction to the mempool so that the next block will - // have a different hash as the hash has been invalidated. - client.sendToAddress(testKey.toAddress(regtest).toString(), 10, function(err) { - if (err) { - throw err; - } - client.generate(2, function(err, response) { - if (err) { - throw err; - } - }); - }); - }); - - }); - describe('Bus Functionality', function() { it('subscribes and unsubscribes to an event on the bus', function(done) { var bus = node.openBus();