-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: Add PrepareCheckState
and Precommit
callbacks
#14860
Merged
tac0turtle
merged 23 commits into
cosmos:main
from
dydxprotocol:prettymuchbryce/add-commiter
Apr 23, 2023
Merged
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
cda4b81
Add Commit callback
prettymuchbryce 862b4d8
Add tests for Commiter change (#5)
prettymuchbryce 1d72615
add precommit callback (#7)
dydxwill 74ef20a
lint
prettymuchbryce a491aaf
Rename Commit to PrepareCheckState
prettymuchbryce d01e7ff
Add documentation to module manager
prettymuchbryce c32d39a
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce ee7016a
Fix implementation and docs
prettymuchbryce 1f05374
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce f4f81e2
Add CHANGELOG entry
prettymuchbryce a557977
Add assertions for Precommit/PrepareCheckState and tests
prettymuchbryce 17ba453
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce b7dc52d
Add new callbacks to config
prettymuchbryce eb40e33
Update mod file with api
prettymuchbryce ea68fee
Update NewManagerFromMap
prettymuchbryce caa2cde
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce a0616d0
Add api to tests package go.mod
prettymuchbryce 22095a4
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce 5393018
Add api to tests package go.mod
prettymuchbryce f20ee96
Set callbacks during Load
prettymuchbryce cf4674e
Fix comment
prettymuchbryce d40920f
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce bd73f81
Merge branch 'main' into prettymuchbryce/add-commiter
prettymuchbryce 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -485,9 +485,17 @@ func (app *BaseApp) Commit() abci.ResponseCommit { | |
// Commit. Use the header from this latest block. | ||
app.setState(runTxModeCheck, header) | ||
|
||
if app.precommiter != nil { | ||
app.precommiter(app.deliverState.ctx) | ||
} | ||
|
||
// empty/reset the deliver state | ||
app.deliverState = nil | ||
|
||
if app.commiter != nil { | ||
app.commiter(app.checkState.ctx) | ||
} | ||
|
||
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. Change potentially affects state. Call sequence:
|
||
var halt bool | ||
|
||
switch { | ||
|
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
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
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
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
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
Oops, something went wrong.
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.
Change potentially affects state.
Call sequence: