-
Notifications
You must be signed in to change notification settings - Fork 38
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 for interval. #1926
Fix for interval. #1926
Conversation
description pls |
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'm not sure if the logic is right
go/host/enclave/guardian.go
Outdated
if interval == 0 { | ||
interval = g.blockTime | ||
interval = 20 * time.Second |
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.
shouldn't this be a default somewhere?
And the log does not match the value
go/host/enclave/guardian.go
Outdated
g.logger.Debug("No cross chain data to submit. Skipping.") | ||
continue | ||
} | ||
|
||
err = g.sl.L1Publisher().PublishCrossChainBundle(bundle) |
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.
does this mean you're publishing even if there is nothing to publish?
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.
Yep, it's less than ideal
@@ -286,10 +286,6 @@ func (p *Publisher) PublishCrossChainBundle(bundle *common.ExtCrossChainBundle) | |||
return nil | |||
} | |||
|
|||
if len(bundle.CrossChainRootHashes) == 0 { |
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.
am I missing something, or will this keep publishing every time?
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.
the guardian loop continues before calling this when empty
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.
what line?
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.
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.
lgtm
* Fix for interval. * Removed defaulting from guardian as there should already be a default value. * Made the fromSeqNo to be local. * Modify how the local cached seq no is set. * Add missing cfg option. * Another missing default value. --------- Co-authored-by: StefanIliev545 <[email protected]>
* Fix for interval. * Removed defaulting from guardian as there should already be a default value. * Made the fromSeqNo to be local. * Modify how the local cached seq no is set. * Add missing cfg option. * Another missing default value. --------- Co-authored-by: StefanIliev545 <[email protected]>
Why this change is needed
Please provide a description and a link to the underlying ticket
What changes were made as part of this PR
Please provide a high level list of the changes made
PR checks pre-merging
Please indicate below by ticking the checkbox that you have read and performed the required
PR checks