Skip to content
Snippets Groups Projects
Commit 47b17de3 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix: UI was not switching to home after a synchronization

parent 87f05b5e
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,8 @@ function Synchroniser (server, host, port, conf, interactive) {
this.sync = (to, chunkLen, askedCautious, nopeers) => co(function*() {
try {
const vucoin = yield getVucoin(host, port, vucoinOptions);
const peering = yield Q.nfcall(vucoin.network.peering.get);
......@@ -189,6 +191,14 @@ function Synchroniser (server, host, port, conf, interactive) {
// Save currency parameters given by root block
const rootBlock = yield server.dal.getBlock(0);
yield BlockchainService.saveParametersForRootBlock(rootBlock);
server.dal.blockDAL.cleanCache();
that.push({ sync: true });
} catch (err) {
that.push({ sync: false, msg: err });
err && watcher.writeStatus(err.message || String(err));
watcher.end();
throw err;
}
});
function getVucoin(theHost, thePort, options) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment