improve logs
This commit is contained in:
parent
1d67ce4310
commit
e99871fce9
@ -155,9 +155,7 @@ BitcoreNode.prototype.start = function() {
|
|||||||
var self = this;
|
var self = this;
|
||||||
var genesis = bitcore.Block.fromBuffer(genesisBlocks[bitcore.Networks.defaultNetwork.name]);
|
var genesis = bitcore.Block.fromBuffer(genesisBlocks[bitcore.Networks.defaultNetwork.name]);
|
||||||
|
|
||||||
console.log('getting blockchain');
|
|
||||||
this.blockService.getBlockchain().then(function(blockchain) {
|
this.blockService.getBlockchain().then(function(blockchain) {
|
||||||
console.log('got blockchain', !!blockchain);
|
|
||||||
if (!blockchain) {
|
if (!blockchain) {
|
||||||
self.blockchain = new BlockChain();
|
self.blockchain = new BlockChain();
|
||||||
self.bus.process(genesis);
|
self.bus.process(genesis);
|
||||||
|
|||||||
@ -475,7 +475,7 @@ BlockService.prototype.getBlockchain = function() {
|
|||||||
return self._getLatestHash()
|
return self._getLatestHash()
|
||||||
.then(function(tip) {
|
.then(function(tip) {
|
||||||
if (!tip) {
|
if (!tip) {
|
||||||
console.log('No tip found');
|
console.log('No tip found, syncing blockchain from genesis block');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
console.log('Tip is', tip);
|
console.log('Tip is', tip);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user