File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,4 @@ regtest/data/node3/regtest
30
30
bitcore-node.json *
31
31
* .bak
32
32
* .orig
33
+ lib /services /insight-api
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ HeaderService.prototype._onHeadersSave = function(err) {
402
402
} ) ;
403
403
}
404
404
405
- log . info ( 'Header Service: emitting headers to block service.' ) ;
405
+ log . debug ( 'Header Service: emitting headers to block service.' ) ;
406
406
407
407
self . emit ( 'headers' ) ;
408
408
} ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ describe('Reorg', function() {
207
207
shutdownBitcore ( done ) ;
208
208
} ) ;
209
209
210
- it ( 'should reorg correctly' , function ( done ) {
210
+ it ( 'should reorg correctly when already synced ' , function ( done ) {
211
211
212
212
// at this point we have a fully synced chain at height 7....
213
213
// we now want to send a new block number 7 whose prev hash is block 6 (it should be block 7)
@@ -216,13 +216,15 @@ describe('Reorg', function() {
216
216
setTimeout ( function ( ) {
217
217
218
218
console . log ( 'From Test: reorging to block: ' + reorgBlock . rhash ( ) ) ;
219
+
220
+ // send the reorg block
219
221
rawBlocks . push ( rawReorgBlocks ) ;
220
222
var blockHash = reorgBlock . rhash ( ) ;
221
223
var inv = p2p . Inventory . forBlock ( blockHash ) ;
222
-
223
224
var msg = messages . Inventory ( [ inv ] ) ;
224
225
tcpSocket . write ( msg . toBuffer ( ) ) ;
225
226
227
+ // wait 2 secs until the reorg happens, if it takes any longer the test ought to fail anyway
226
228
setTimeout ( function ( ) {
227
229
var error ;
228
230
var request = http . request ( 'http://localhost:53001/api/block/' + reorgBlock . rhash ( ) , function ( res ) {
@@ -269,5 +271,6 @@ describe('Reorg', function() {
269
271
270
272
271
273
} ) ;
274
+
272
275
} ) ;
273
276
You can’t perform that action at this time.
0 commit comments