diff --git a/app/app.go b/app/app.go index 42654374c..85506ed42 100644 --- a/app/app.go +++ b/app/app.go @@ -1,6 +1,7 @@ package app import ( + "fmt" "github.com/tendermint/basecoin/state" "github.com/tendermint/basecoin/types" . "github.com/tendermint/go-common" @@ -38,6 +39,7 @@ func (app *Basecoin) SetOption(key string, value string) (log string) { switch key { case "chainID": app.state.SetChainID(value) + return "Success" case "account": var err error var setAccount types.Account @@ -119,5 +121,6 @@ func (app *Basecoin) InitChain(validators []*tmsp.Validator) { // TMSP::EndBlock func (app *Basecoin) EndBlock(height uint64) []*tmsp.Validator { + app.state.ResetCacheState() return app.govMint.EndBlock(height) } diff --git a/types/account.go b/types/account.go index 9d8e6bace..d17083968 100644 --- a/types/account.go +++ b/types/account.go @@ -7,9 +7,9 @@ import ( ) type Account struct { - PubKey crypto.PubKey // May be nil, if not known. - Sequence int - Balance int64 + PubKey crypto.PubKey `json:"pub_key"` // May be nil, if not known. + Sequence int `json:"sequence"` + Balance int64 `json:"balance"` } func (acc *Account) Copy() *Account {