From 7643dea2555f5571bc64efe7bdd0523627b7399a Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Mon, 5 Feb 2018 02:41:55 +0100 Subject: [PATCH] genesis wip compiles --- examples/basecoin/app/init_baseapp.go | 3 ++- types/genesis.go | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 types/genesis.go diff --git a/examples/basecoin/app/init_baseapp.go b/examples/basecoin/app/init_baseapp.go index 6cc688752..7ae6dd57d 100644 --- a/examples/basecoin/app/init_baseapp.go +++ b/examples/basecoin/app/init_baseapp.go @@ -30,9 +30,10 @@ func (app *BasecoinApp) initBaseAppTxDecoder() { // used to define the custom logic for initialization func (app *BasecoinApp) initBaseAppInitStater() { - accountMapper := app.accountMapper + //accountMapper := app.accountMapper app.BaseApp.SetInitStater(func(ctx sdk.Context, stateJSON []byte) sdk.Error { // TODO: parse JSON //accountMapper.SetAccount(ctx, ...) + return nil }) } diff --git a/types/genesis.go b/types/genesis.go new file mode 100644 index 000000000..995d2de57 --- /dev/null +++ b/types/genesis.go @@ -0,0 +1,4 @@ +package types + +// function variable used to initialize application state at genesis +type InitStater func(ctx Context, stateJSON []byte) Error