-
Notifications
You must be signed in to change notification settings - Fork 11
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
add precommit callback #7
Conversation
baseapp/baseapp.go
Outdated
@@ -70,6 +70,7 @@ type BaseApp struct { //nolint: maligned | |||
prepareProposal sdk.PrepareProposalHandler // the handler which runs on ABCI PrepareProposal | |||
endBlocker sdk.EndBlocker // logic to run after all txs, and to determine valset changes | |||
commiter sdk.Commiter // logic to run during commit | |||
precommiter sdk.Precommiter // logic to run during precommit |
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.
nit:
precommiter sdk.Precommiter // logic to run during precommit | |
precommiter sdk.Precommiter // logic to run during commit using the `deliverState` |
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.
done
types/abci.go
Outdated
@@ -23,6 +23,10 @@ type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBloc | |||
// branched for the new block. | |||
type Commiter func(ctx Context) | |||
|
|||
// Precommiter runs code during commit before the `deliverState` is reset. For the Dydx chain, it is currently |
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.
nit: Remove the dYdX specific comment. I think we can include this context downstream in v4
.
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.
done
precommit callback will be used for emitting Indexer onchain events from the deliverState