-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: handle requests with no responses after deadline #91
base: dev
Are you sure you want to change the base?
Conversation
this.logger.info(`Finalizing request ${request.id} with no response`); | ||
|
||
const response: Response["prophetData"] = { | ||
requestId: "0x0000000000000000000000000000000000000000" as RequestId, // Can be any request ID |
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.
requestId: "0x0000000000000000000000000000000000000000" as RequestId, // Can be any request ID | |
requestId: "0x0000000000000000000000000000000000000000" as RequestId, // Must be 0x0 address |
return; | ||
} else { | ||
// TODO: check for responseModuleData.deadline, if no answer has been accepted after the deadline | ||
// notify and (TBD) finalize with no response | ||
// Check if the response deadline has passed with no accepted responses |
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.
I think we might have an edge case where there are no finalizable responses (yet), there are still some open disputes and one of them could end up with Lost
status, thus, causing the disputed response to be the accepted one.
We should check for active disputes, prior finalizing with no request. Something like this probably?
// Check if the response deadline has passed with no accepted responses | |
const activeDisputes = this.getActiveDisputes(); | |
if (activeDisputes.length === 0) return; | |
// Check if the response deadline has passed with no accepted responses |
@@ -972,95 +962,5 @@ describe("EboProcessor", () => { | |||
expect(createRequestSpy).toHaveBeenCalledTimes(1); | |||
expect(createRequestSpy).toHaveBeenCalledWith(currentEpoch.number, "eip155:42161"); | |||
}); | |||
|
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.
Just to confirm that I'm not missing anything: these are the duplicated tests, right?
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.
good to go after addressing Yaco's comments 👍
🤖 Linear
Closes GRT-236
Description