Skip to content

Commit

Permalink
Merge pull request #268 from cherry1603/develop
Browse files Browse the repository at this point in the history
fix history write during sync
  • Loading branch information
LucasMLK authored Aug 19, 2023
2 parents 5fc8efa + a7a3842 commit 76e2df8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/xdag/consensus/SyncManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ public void makeSyncDone() {

log.info("sync done, the last main block number = {}", blockchain.getXdagStats().nmain);
kernel.getSync().setStatus(XdagSync.Status.SYNC_DONE);
// sync done, the remaining history is batch written.
txHistoryStore.batchSaveTxHistory(null);

if (config.getEnableGenerateBlock()) {
log.info("start pow at:" + FastDateFormat.getInstance("yyyy-MM-dd 'at' HH:mm:ss z").format(new Date()));
Expand Down

0 comments on commit 76e2df8

Please sign in to comment.