Skip to content
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

5547 end event loop #5606

Merged
merged 3 commits into from
Jun 16, 2022
Merged

5547 end event loop #5606

merged 3 commits into from
Jun 16, 2022

Conversation

Chris-Hibbert
Copy link
Contributor

closes: #5547

Description

add eventLoopIteration() in manualtimer's tickN()

Also moved testLoopIteration() from run-protocol to live with the manualTimer in Zoe/test

Security Considerations

None. Test only.

Documentation Considerations

None

Testing Considerations

@Chris-Hibbert Chris-Hibbert added Zoe package: Zoe test labels Jun 15, 2022
@Chris-Hibbert Chris-Hibbert added this to the Mainnet 1 milestone Jun 15, 2022
@Chris-Hibbert Chris-Hibbert self-assigned this Jun 15, 2022
Comment on lines 2730 to 2731
const periods = 5;
await manualTimer.tickN(periods);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

periods had been used for t.is(interestAccrued, periods * 2n) but not anymore and I'm not confident the math works out that cleanly for arbitrary N.

if you feel like it,

Suggested change
const periods = 5;
await manualTimer.tickN(periods);
await manualTimer.tickN(5);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* that all promises that can do resolve.
* Note that this doesn't mean all outstanding promises.
*/
export const eventLoopIteration = async () =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea

@Chris-Hibbert Chris-Hibbert added the automerge:no-update (expert!) Automatically merge without updates label Jun 16, 2022
@mergify mergify bot merged commit 986ae7f into master Jun 16, 2022
@mergify mergify bot deleted the 5547-endEventLoop branch June 16, 2022 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates test Zoe package: Zoe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

manualTimer runs differently when each tick awaited
2 participants