diff --git a/glide.lock b/glide.lock index 05e74faa8..c42bd57f6 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: f420f1f858100218dad50997d939eaaf129ff654a0648a47ddc60d626ab0b8e9 -updated: 2017-12-10T05:37:46.41123196Z +hash: ff6e6786ec24ffac91df45d4a1cdcefae5280700667ca76b8b9b96f343d78c95 +updated: 2017-12-13T18:04:10.05914801+01:00 imports: - name: github.com/btcsuite/btcd version: 2e60448ffcc6bf78332d1fe590260095f554dd78 @@ -103,7 +103,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: fca2b508c185b855af1446ec4afc19bdfc7b315d + version: 895e14d6bd9cdad98eab4a051decbaad46f7eebd subpackages: - client - example/code diff --git a/glide.yaml b/glide.yaml index e614d0a1e..2b6593a17 100644 --- a/glide.yaml +++ b/glide.yaml @@ -18,7 +18,7 @@ import: - package: github.com/spf13/viper version: v1.0.0 - package: github.com/tendermint/abci - version: ~v0.8.0 + version: feature/enhance-endblock subpackages: - client - example/dummy diff --git a/state/execution.go b/state/execution.go index 7ba4ac3e9..6f6a7ca18 100644 --- a/state/execution.go +++ b/state/execution.go @@ -111,11 +111,11 @@ func execBlockOnProxyApp(txEventPublisher types.TxEventPublisher, proxyAppConn p return nil, err } - valDiff := abciResponses.EndBlock.Diffs + valChanges := abciResponses.EndBlock.Changes logger.Info("Executed block", "height", block.Height, "validTxs", validTxs, "invalidTxs", invalidTxs) - if len(valDiff) > 0 { - logger.Info("Update to validator set", "updates", abci.ValidatorsString(valDiff)) + if len(valChanges) > 0 { + logger.Info("Update to validator set", "updates", abci.ValidatorsString(valChanges)) } return abciResponses, nil diff --git a/state/state.go b/state/state.go index f8a8d1a03..3c9333b75 100644 --- a/state/state.go +++ b/state/state.go @@ -238,8 +238,8 @@ func (s *State) SetBlockAndValidators(header *types.Header, blockPartsHeader typ nextValSet := prevValSet.Copy() // update the validator set with the latest abciResponses - if len(abciResponses.EndBlock.Diffs) > 0 { - err := updateValidators(nextValSet, abciResponses.EndBlock.Diffs) + if len(abciResponses.EndBlock.Changes) > 0 { + err := updateValidators(nextValSet, abciResponses.EndBlock.Changes) if err != nil { s.logger.Error("Error changing validator set", "err", err) // TODO: err or carry on? diff --git a/state/state_test.go b/state/state_test.go index 9b78b3871..2c403a425 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -80,7 +80,7 @@ func TestABCIResponsesSaveLoad(t *testing.T) { abciResponses := NewABCIResponses(block) abciResponses.DeliverTx[0] = &abci.ResponseDeliverTx{Data: []byte("foo"), Tags: []*abci.KVPair{}} abciResponses.DeliverTx[1] = &abci.ResponseDeliverTx{Data: []byte("bar"), Log: "ok", Tags: []*abci.KVPair{}} - abciResponses.EndBlock = &abci.ResponseEndBlock{Diffs: []*abci.Validator{ + abciResponses.EndBlock = &abci.ResponseEndBlock{Changes: []*abci.Validator{ { PubKey: crypto.GenPrivKeyEd25519().PubKey().Bytes(), Power: 10, @@ -199,13 +199,13 @@ func makeHeaderPartsResponses(state *State, height int64, _, val := state.Validators.GetByIndex(0) abciResponses := &ABCIResponses{ Height: height, - EndBlock: &abci.ResponseEndBlock{Diffs: []*abci.Validator{}}, + EndBlock: &abci.ResponseEndBlock{Changes: []*abci.Validator{}}, } // if the pubkey is new, remove the old and add the new if !bytes.Equal(pubkey.Bytes(), val.PubKey.Bytes()) { abciResponses.EndBlock = &abci.ResponseEndBlock{ - Diffs: []*abci.Validator{ + Changes: []*abci.Validator{ {val.PubKey.Bytes(), 0}, {pubkey.Bytes(), 10}, },