Skip to content

Fix: start tick of multitick donate#622

Open
jnoorchashm37 wants to merge 1 commit intomainfrom
fix/tick-bug
Open

Fix: start tick of multitick donate#622
jnoorchashm37 wants to merge 1 commit intomainfrom
fix/tick-bug

Conversation

@jnoorchashm37
Copy link
Copy Markdown
Collaborator

No description provided.

@jnoorchashm37 jnoorchashm37 changed the title init fix Fix: start tick of multitick donate Aug 30, 2025
Copy link
Copy Markdown
Contributor

@Philogy Philogy left a comment

Choose a reason for hiding this comment

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

I don't see any update to tests, how are you testing that this doesn't run into the donate above edge case?

Comment on lines +174 to +176
while start_tick % I24::unchecked_from(self.tick_spacing) != I24::ZERO {
start_tick += I24::ONE;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tick spacing can be up to 2^15-1 in theory, best to make this a constant expr, smth like if ... != I24:ZERO { start_tick += self.tick_spacing - start_tick % self.tick_spacing }

Comment on lines +221 to +223
while start_tick % I24::unchecked_from(self.tick_spacing) != I24::ZERO {
start_tick += I24::ONE;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here, don't use loop maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants