-
Notifications
You must be signed in to change notification settings - Fork 51
General callback scheduler improvements #508
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
General callback scheduler improvements #508
Conversation
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 just left the same comments that I left on #507 so we can just work and merge from here
| /// and route all callback functionality | ||
| access(self) var sharedScheduler: Capability<auth(Cancel) &SharedScheduler> | ||
|
|
||
| access(all) let schedulerStoragePath: Path |
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.
| access(all) let schedulerStoragePath: Path | |
| access(all) let storagePath: Path |
| } | ||
|
|
||
| /// Get all timestamps that are in the past (less than or equal to current timestamp) | ||
| access(all) fun past(current: UFix64): [UFix64] { |
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.
| access(all) fun past(current: UFix64): [UFix64] { | |
| access(all) fun getTimestampsBefore(current: UFix64): [UFix64] { |
|
|
||
| /// Check if there are any timestamps that need processing | ||
| /// Returns true if processing is needed, false for early exit | ||
| access(all) fun check(current: UFix64): Bool { |
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.
| access(all) fun check(current: UFix64): Bool { | |
| access(all) fun checkIfTimestampsNeedProcessing(current: UFix64): Bool { |
f96494a
into
onflow:feature/callback-scheduling
* Optimise processing with sorted timestamps * Add tests for sorted timestamps type * Fix wrong assert args * Extract garbage collection * Add missing arg * Handle wrong statuses * Change access control to account * Change access control to only limit process and execute to FVM * Add comments * Regenerate all the assets * generate assets --------- Co-authored-by: Joshua Hannan <[email protected]>
Restricting access to
processandexecuteto only service account, so the FVM can still execute them but others can't.Other minor improvements to comments and some code cleanup.