-
Notifications
You must be signed in to change notification settings - Fork 108
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
fix IterateInitTimeoutTimestamp #549
Conversation
@@ -332,11 +332,9 @@ func (k Keeper) EndBlockCCR(ctx sdk.Context) { | |||
if currentTimeUint64 > ts { |
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.
Hey @MSalopek- can you add a comment on IterateInitTimeoutTimestamp
(in different file), making it clear that it is not in order?
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.
Can you also open an issue on the repo (put it in the v1.1 milestone) to make IterateInitTimeoutTimestamp
go in order? That would be a little better because it would avoid uneccesary iteration.
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.
Can do: #561. Can't tag it as 1.1 though, maybe I'm missing some access rights?
Are we expecting loads of chains to be removed due to timeouts? If we're iterating 5-20 items this does not seem worthwhile.
0313d92
to
287450e
Compare
Description
provider.EndBlockCCR
removes chains which timed out. However, when iterating through all chains, it stops as soon as it finds one chain that did not time out, falsely assuming that the chains are ordered by their time of arrival <=> expiration time.Linked issues
Closes: #513
Type of change
Please delete options that are not relevant.
How was the feature tested?
Other information
This bug was found during code audit.
Checklist:
Please delete options that are not relevant.
make test
)IterateX(ctx sdk.Context, cb func(arg1, arg2) (stop bool))
)