Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
feat: ensure saveState triggered on new block header imported
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Werner committed Feb 8, 2021
1 parent 013e65e commit f72fd44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = async function syncUpToTheGapLimit({
}
})
.on('error', (err) => {
logger.silly('TransactionSyncStreamWorker - end stream on error');
logger.silly(`TransactionSyncStreamWorker - end stream on error: ${err}`);
reject(err);
})
.on('end', () => {
Expand Down
1 change: 1 addition & 0 deletions src/types/Storage/methods/importBlockHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const importBlockHeader = function importBlockHeader(blockHeader, height) {
chainStore.mappedBlockHeaderHeights[blockHeight] = blockHeader.hash;

self.announce(EVENTS.BLOCKHEADER, blockHeader);
this.lastModified = Date.now();
}
};
module.exports = importBlockHeader;

0 comments on commit f72fd44

Please sign in to comment.