-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OG-570 Server readiness stats #666
Conversation
Also adding tests for required params
This reverts commit 7a0688c.
you have "Curernt state time", but not the actual current state.. |
packages/relay/src/HttpServer.ts
Outdated
try { | ||
const statsResponse = this.relayService.statsHandler() | ||
res.send(statsResponse) | ||
console.log('stats sent.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -40,7 +40,8 @@ contract('PenalizerService', function (accounts) { | |||
url: '', | |||
workdir: '', | |||
etherscanApiUrl: 'etherscanApiUrl', | |||
relayHubAddress: env.relayHub.address | |||
relayHubAddress: env.relayHub.address, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, its required... how did the test pass without it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was given default owner (zero address), which is now no longer allowed. This is from previous PR #665
statsHandler (): StatsResponse { | ||
const now = Date.now() | ||
const statsResponse: StatsResponse = { ...this.readinessInfo, totalUptime: now - this.readinessInfo.runningSince } | ||
if (this.isReady()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
took me a while to understand: you update here the partial state, since last state change... maybe we can put a comment.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Message format: