Merge pull request #367 from matiu/bug/10sync
broadcast last sync status
This commit is contained in:
commit
60cb967f04
|
@ -70,7 +70,7 @@ function spec() {
|
|||
|
||||
HistoricSync.prototype.setError = function(err) {
|
||||
var self = this;
|
||||
self.error = err.toString();
|
||||
self.error = err.message?err.message:err.toString();
|
||||
self.status='error';
|
||||
self.showProgress();
|
||||
return err;
|
||||
|
@ -384,13 +384,12 @@ function spec() {
|
|||
|
||||
async.whilst(
|
||||
function() {
|
||||
self.showProgress();
|
||||
return self.status === 'syncing';
|
||||
},
|
||||
function (w_cb) {
|
||||
self.getFn(function(err,blockInfo) {
|
||||
if (err) return w_cb(self.setError(err));
|
||||
|
||||
self.showProgress();
|
||||
if (blockInfo && blockInfo.hash) {
|
||||
self.syncedBlocks++;
|
||||
self.sync.storeTipBlock(blockInfo, self.allowReorgs, function(err) {
|
||||
|
|
Loading…
Reference in New Issue