Skip to content

Commit

Permalink
update validation complete condition
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Oct 9, 2023
1 parent 63e9f6a commit 1fbf703
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/client/src/service/skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -966,13 +966,17 @@ export class Skeleton extends MetaDBManager {
vmHead !== undefined &&
this.status.linked &&
(vmHead?.header.number ?? BIGINT_0) === (subchain0?.head ?? BIGINT_0)
if (isValid) {
if (this.lastvalid === 0) {
this.config.superMsg('Chain validation completed')

// track for printing log because validation oscillates between multiple calls
if (forceShowInfo === true) {
if (isValid) {
if (this.lastvalid === 0) {
this.config.superMsg('Chain validation completed')
}
this.lastvalid = Date.now()
} else {
this.lastvalid = 0
}
this.lastvalid = Date.now()
} else {
this.lastvalid = 0
}

Check warning on line 981 in packages/client/src/service/skeleton.ts

View check run for this annotation

Codecov / codecov/patch

packages/client/src/service/skeleton.ts#L977-L981

Added lines #L977 - L981 were not covered by tests
const isSynced =
Expand Down

0 comments on commit 1fbf703

Please sign in to comment.