Merge pull request #252 from cosmos/develop

update tm 0.11
This commit is contained in:
Rigel 2017-10-02 22:48:48 -04:00 committed by GitHub
commit 612ca9dc8c
7 changed files with 23 additions and 16 deletions

View File

@ -57,7 +57,7 @@ func (app *Basecoin) GetState() sm.SimpleDB {
}
// Info - ABCI
func (app *Basecoin) Info() abci.ResponseInfo {
func (app *Basecoin) Info(req abci.RequestInfo) abci.ResponseInfo {
resp := app.state.Info()
app.height = resp.LastBlockHeight
return abci.ResponseInfo{
@ -157,14 +157,14 @@ func (app *Basecoin) Commit() (res abci.Result) {
}
// InitChain - ABCI
func (app *Basecoin) InitChain(validators []*abci.Validator) {
func (app *Basecoin) InitChain(req abci.RequestInitChain) {
// for _, plugin := range app.plugins.GetList() {
// plugin.InitChain(app.state, validators)
// }
}
// BeginBlock - ABCI
func (app *Basecoin) BeginBlock(hash []byte, header *abci.Header) {
func (app *Basecoin) BeginBlock(req abci.RequestBeginBlock) {
app.height++
// for _, plugin := range app.plugins.GetList() {
// plugin.BeginBlock(app.state, hash, header)

View File

@ -73,7 +73,7 @@ func TestEndBlock(t *testing.T) {
}
for i, tc := range cases {
app.BeginBlock(nil, nil)
app.BeginBlock(abci.RequestBeginBlock{})
for _, c := range tc.changes {
tx := base.ValChangeTx{c}.Wrap()
txBytes := wire.BinaryBytes(tx)

View File

@ -46,7 +46,7 @@ func getGenesisJSON(chainID string) string {
"genesis_time": "0001-01-01T00:00:00.000Z",
"validators": [
{
"amount": 10,
"power": 10,
"name": "",
"pub_key": {
"type": "ed25519",

14
glide.lock generated
View File

@ -1,5 +1,5 @@
hash: 647d25291b8e9a85cb4a49abc972a41537e8a286514bf41180845785e3b180a4
updated: 2017-09-13T14:11:46.879460282+02:00
hash: 13b2e56dd6cc3e16b9b26517673a0f395512ec0a56ee1d8ced91c857f979b6b5
updated: 2017-10-02T21:00:47.950265734-04:00
imports:
- name: github.com/bgentry/speakeasy
version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd
@ -107,7 +107,7 @@ imports:
- leveldb/table
- leveldb/util
- name: github.com/tendermint/abci
version: a0724296592f63c0b7fdbc4eec1a7e53b6f4eb55
version: 191c4b6d176169ffc7f9972d490fa362a3b7d940
subpackages:
- client
- example/dummy
@ -119,7 +119,7 @@ imports:
- edwards25519
- extra25519
- name: github.com/tendermint/go-crypto
version: 50e7c078170975532ca52004cb03a473afdebbff
version: 0418d32276d7d0f080e4c0e58b49c6ba2f717954
subpackages:
- keys
- keys/cryptostore
@ -132,7 +132,7 @@ imports:
- data
- data/base58
- name: github.com/tendermint/iavl
version: a3ec7707c4eacabd33b7c510df364bfce1eb33e6
version: 2d3ca4f466c32953641d4c49cad3d93eb7876a5e
- name: github.com/tendermint/light-client
version: ac2e4bf47b31aaf5d3d336691ac786ec751bfc32
subpackages:
@ -145,7 +145,7 @@ imports:
subpackages:
- iavl
- name: github.com/tendermint/tendermint
version: cc50dc076a21df40477b1ce77348010f3f3defc4
version: cd8dff0c96ca3ea1ec44d637f93c10c418edac1a
subpackages:
- blockchain
- cmd/tendermint/commands
@ -172,7 +172,7 @@ imports:
- types
- version
- name: github.com/tendermint/tmlibs
version: bfec1ff1cd7fda9f5b2d8b570e3bec163e5f9149
version: 0948343a6fd4efce07894c312d8e96c5f277c608
subpackages:
- autofile
- cli

View File

@ -30,7 +30,7 @@ import:
- package: github.com/tendermint/iavl
version: develop
- package: github.com/tendermint/tendermint
version: develop
version: fix/autofile
subpackages:
- config
- node

View File

@ -148,7 +148,7 @@ func GetGenesisJSON(chainID, addr string, options string) string {
"genesis_time": "0001-01-01T00:00:00.000Z",
"validators": [
{
"amount": 10,
"power": 10,
"name": "",
"pub_key": {
"type": "ed25519",

View File

@ -118,8 +118,15 @@ func startTendermint(dir string, basecoinApp *app.Basecoin) error {
}
// Create & start tendermint node
privValidator := types.LoadOrGenPrivValidator(cfg.PrivValidatorFile(), logger)
n := node.NewNode(cfg, privValidator, proxy.NewLocalClientCreator(basecoinApp), logger.With("module", "node"))
n, err := node.NewNode(cfg,
types.LoadOrGenPrivValidatorFS(cfg.PrivValidatorFile()),
proxy.NewLocalClientCreator(basecoinApp),
node.DefaultGenesisDocProviderFunc(cfg),
node.DefaultDBProvider,
logger.With("module", "node"))
if err != nil {
return err
}
_, err = n.Start()
if err != nil {