tendermint/state
Emmanuel Odeke 7939d62ef0
all, state: unexpose GenesisDoc, ChainID fields make them accessor methods
Fixes #671

Unexpose GenesisDoc and ChainID fields to avoid them being
serialized to the DB on every block write/state.Save()

A GenesisDoc can now be alternatively written to the state's
database, by serializing its JSON as a value of key "genesis-doc".

There are now accessors and a setter for these attributes:
- state.GenesisDoc() (*types.GenesisDoc, error)
- state.ChainID() (string, error)
- state.SetGenesisDoc(*types.GenesisDoc)

This is a breaking change since it changes how the state's
serialization and requires that if loading the GenesisDoc entirely
from the database, you'll need to set its value in the database
as the GenesisDoc's JSON marshaled bytes.
2017-10-16 10:34:01 +04:00
..
txindex some fixes from review 2017-06-27 16:05:21 -04:00
errors.go state: persist validators 2017-09-03 16:07:37 -04:00
execution.go all, state: unexpose GenesisDoc, ChainID fields make them accessor methods 2017-10-16 10:34:01 +04:00
execution_test.go all: no more anonymous imports 2017-10-04 16:40:45 -04:00
state.go all, state: unexpose GenesisDoc, ChainID fields make them accessor methods 2017-10-16 10:34:01 +04:00
state_test.go all, state: unexpose GenesisDoc, ChainID fields make them accessor methods 2017-10-16 10:34:01 +04:00