-
Notifications
You must be signed in to change notification settings - Fork 46
Submit on FM startup #119
Submit on FM startup #119
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,7 @@ func (fm *FluxMonitor) eventListener(ch <-chan interface{}) { | |
} | ||
|
||
func (fm *FluxMonitor) canSubmitToRound(initiate bool) bool { | ||
|
||
if !fm.state.CanSubmit { | ||
logger.Info("Oracle can't submit to this feed") | ||
|
||
|
@@ -256,6 +257,7 @@ func (fm *FluxMonitor) hitTrigger() { | |
|
||
func (fm *FluxMonitor) startPoller() { | ||
fm.poll() | ||
fm.checkAndSendJob(false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably move this to FM startup and when eligibility to submit changes. Although we haven't gotten that far yet, there will be cases where the poller is disabled - so we can't always rely on this to be triggered. I'll make a new issue for making the poll interval and heartbeat "optional" - but for now I think we should just move this to the FM startup and when the FA state is updated to make the oracle eligible to submit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But if we call it in an earlier state than here, before polling has started(e.g near the 1st call of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, so that function will see that it doesn't have any recent results and do it's own poll to get the latest median. |
||
ticker := time.NewTicker(fm.config.PollInterval) | ||
defer ticker.Stop() | ||
|
||
|
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.