Skip to content

Commit

Permalink
refactor(service): add detail to save skipping log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhitt committed Dec 15, 2023
1 parent 068ea74 commit 03a7735
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,15 @@ export async function updateAndSaveCurrentReport() {
// within MAX_FORK_DEPTH blocks of the end of the epoch. If users ever
// need to override this they can use the CLI to manually save the
// report.
log.info('Not saving report - too close to end of epoch');
log.info('Not saving report - too close to end of epoch', {
currentHeight,
epochEndHeight: report.epochEndHeight,
});
} else if (currentHeight < saveAfterHeight) {
log.info('Not saving report - save height not reached');
log.info('Not saving report - save height not reached', {
currentHeight,
saveAfterHeight,
});
} else {
reportSink.saveReport({ report });
}
Expand Down

0 comments on commit 03a7735

Please sign in to comment.