WIP refactor working

This commit is contained in:
rigelrozanski
2018-02-17 16:32:30 -05:00
committed by Ethan Buchman
parent 6681904af9
commit 938ee94e9e
6 changed files with 25 additions and 15 deletions
+10 -3
View File
@@ -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
}
+1 -1
View File
@@ -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
}