Skip to content
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

WIP: Pass AnteHandler and TxDecoder in constructor #512

Closed
wants to merge 1 commit into from

Conversation

adrianbrink
Copy link
Contributor

closes #480

@adrianbrink adrianbrink changed the title Pass AnteHandler and TxDecoder in constructor REVIEW: Pass AnteHandler and TxDecoder in constructor Feb 26, 2018
@ethanfrey ethanfrey changed the title REVIEW: Pass AnteHandler and TxDecoder in constructor WIP: Pass AnteHandler and TxDecoder in constructor Feb 27, 2018
@ethanfrey
Copy link
Contributor

Please make sure tests pass before marking it as ready for review.
You can run make test or look for the little red x on the bottom of this page.

)

func init() {
cdc = MakeTxCodec()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no globals please. let's just pass it into txDecoder

@@ -53,13 +53,17 @@ type BaseApp struct {
var _ abci.Application = &BaseApp{}

// Create and name new BaseApp
func NewBaseApp(name string, logger log.Logger, db dbm.DB) *BaseApp {
func NewBaseApp(name string, logger log.Logger, db dbm.DB, txDecoder sdk.TxDecoder,
ah sdk.AnteHandler) *BaseApp {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we now allow nil AnteHandler, so lets remove it from the constructor.


// keys to access the substores
capKeyMainStore *sdk.KVStoreKey
capKeyIBCStore *sdk.KVStoreKey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to comment out and add a note about using it in the future instead of just removing

@ebuchman
Copy link
Member

ebuchman commented Mar 4, 2018

Closing in favour of #559

@ebuchman ebuchman closed this Mar 4, 2018
@ebuchman ebuchman deleted the adrian/ah_and_txd_required branch March 31, 2018 23:27
MSalopek added a commit to MSalopek/cosmos-sdk that referenced this pull request Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

baseapp: anteHandler and txDecoder are required fields
3 participants