WIP refactor working
This commit is contained in:
committed by
Ethan Buchman
parent
6681904af9
commit
938ee94e9e
@@ -44,17 +44,18 @@ func NewBasecoinApp(genesisPath string) *BasecoinApp {
|
||||
)
|
||||
cdc := accountMapper.WireCodec()
|
||||
auth.RegisterWireBaseAccount(cdc)
|
||||
// Make accountMapper's WireCodec() inaccessible.
|
||||
app.accountMapper = accountMapper.Seal()
|
||||
|
||||
// create your application object
|
||||
var app = &BasecoinApp{
|
||||
BaseApp: bam.NewBaseApp(appName, accountMapper),
|
||||
BaseApp: bam.NewBaseApp(appName),
|
||||
cdc: makeTxCodec(),
|
||||
capKeyMainStore: mainKey,
|
||||
capKeyIBCStore: ibcKey,
|
||||
}
|
||||
|
||||
// Make accountMapper's WireCodec() inaccessible.
|
||||
app.accountMapper = accountMapper.Seal()
|
||||
|
||||
app.initBaseAppTxDecoder()
|
||||
app.initBaseAppInitStater(genesisPath)
|
||||
|
||||
@@ -110,6 +111,12 @@ func (app *BasecoinApp) initBaseAppInitStater(genesisPath string) {
|
||||
}
|
||||
|
||||
app.BaseApp.SetInitStater(func(ctx sdk.Context, state json.RawMessage) sdk.Error {
|
||||
|
||||
// TODO use state ABCI
|
||||
if state == nil {
|
||||
state = genesisAppState
|
||||
}
|
||||
|
||||
if state == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func newTestBasecoinApp() *testBasecoinApp {
|
||||
tba := &testBasecoinApp{
|
||||
BasecoinApp: app,
|
||||
}
|
||||
tba.TestApp = testapp.NewTestApp(app.BaseApp)
|
||||
tba.TestApp = bam.NewTestApp(app.BaseApp)
|
||||
return tba
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user