This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Producer plugin #7791
Merged
Merged
Producer plugin #7791
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0a25074
Additional debug logging
heifner 00f5465
Fix log message
heifner 353a50e
Do not indicate exhausted if only went past scheduled trx deadline'
heifner 09fbc9f
Do not wake up a block earily as that just causes a block to get star…
heifner d478d31
Produce block immediately when exhausted without going through timer
heifner 815149b
Add # to debug output
heifner cb05450
Revert "Produce block immediately when exhausted without going throug…
heifner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
While I cannot find a direct reason this is an issue, there are a few implicit requirements that this may one day run-afoul of that I think we should attempt to make more explicit
schedule_production_loop
is almost always called from a destructor of anfc::scoped_exit
which means it really shouldn't throw (maybe one day we should consider requiringnoexcept
qualifiers on lambdas forfc::scoped_exit). Right now,
maybe_produce_block` appears to handle all of the exceptions and is clean but I'd be interested in how we make sure the implicit requirement that it not throw is made explicit.maybe_produce_block
callsschedule_production_loop
making this recursive. I don't think it can get into an infinite recursion because this branch is taken based on time but, there are a lot of variables and if this stays direct, perhaps we should "schedule" the call toschedule_production_loop
inmaybe_produce_block
so that it at least clears the stack ?at the least we should probably make the log messages the same (other than the notice about exhaustion) and turn the call and the
fc_dlog
calls into a local lambda so that the messages are kept consistent.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.
Reverted this change as I think it is clearer and more consistent the way it was.