mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-16 04:41:59 +00:00
Compare commits
4 Commits
master
...
v0.25.1-rc
Author | SHA1 | Date | |
---|---|---|---|
|
90eda9bfb6 | ||
|
1ad379aa87 | ||
|
72201676b2 | ||
|
adf8cea09e |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## v0.25.1
|
||||
|
||||
*October 17, 2018*
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- [state] [\#2616](https://github.com/tendermint/tendermint/issues/2616) Fix panic when genesis file's `validators` field is nil
|
||||
- [consensus] [\#2634](https://github.com/tendermint/tendermint/issues/2634) Set `NextValidators` during replay
|
||||
|
||||
## v0.25.0
|
||||
|
||||
*September 22, 2018*
|
||||
@@ -164,8 +173,8 @@ BUG FIXES:
|
||||
*August 22nd, 2018*
|
||||
|
||||
BUG FIXES:
|
||||
- [libs/autofile] \#2261 Fix log rotation so it actually happens.
|
||||
- Fixes issues with consensus WAL growing unbounded ala \#2259
|
||||
- [libs/autofile] [\#2261](https://github.com/tendermint/tendermint/issues/2261) Fix log rotation so it actually happens.
|
||||
- Fixes issues with consensus WAL growing unbounded ala [\#2259](https://github.com/tendermint/tendermint/issues/2259)
|
||||
|
||||
## 0.23.0
|
||||
|
||||
|
@@ -287,6 +287,7 @@ func (h *Handshaker) ReplayBlocks(state sm.State, appHash []byte, appBlockHeight
|
||||
return nil, err
|
||||
}
|
||||
state.Validators = types.NewValidatorSet(vals)
|
||||
state.NextValidators = types.NewValidatorSet(vals)
|
||||
}
|
||||
if res.ConsensusParams != nil {
|
||||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
||||
|
@@ -198,17 +198,25 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) {
|
||||
}
|
||||
|
||||
// Make validators slice
|
||||
validators := make([]*types.Validator, len(genDoc.Validators))
|
||||
for i, val := range genDoc.Validators {
|
||||
pubKey := val.PubKey
|
||||
address := pubKey.Address()
|
||||
var validatorSet, nextValidatorSet *types.ValidatorSet
|
||||
if genDoc.Validators == nil {
|
||||
validatorSet = types.NewValidatorSet(nil)
|
||||
nextValidatorSet = types.NewValidatorSet(nil)
|
||||
} else {
|
||||
validators := make([]*types.Validator, len(genDoc.Validators))
|
||||
for i, val := range genDoc.Validators {
|
||||
pubKey := val.PubKey
|
||||
address := pubKey.Address()
|
||||
|
||||
// Make validator
|
||||
validators[i] = &types.Validator{
|
||||
Address: address,
|
||||
PubKey: pubKey,
|
||||
VotingPower: val.Power,
|
||||
// Make validator
|
||||
validators[i] = &types.Validator{
|
||||
Address: address,
|
||||
PubKey: pubKey,
|
||||
VotingPower: val.Power,
|
||||
}
|
||||
}
|
||||
validatorSet = types.NewValidatorSet(validators)
|
||||
nextValidatorSet = types.NewValidatorSet(validators).CopyIncrementAccum(1)
|
||||
}
|
||||
|
||||
return State{
|
||||
@@ -219,8 +227,8 @@ func MakeGenesisState(genDoc *types.GenesisDoc) (State, error) {
|
||||
LastBlockID: types.BlockID{},
|
||||
LastBlockTime: genDoc.GenesisTime,
|
||||
|
||||
NextValidators: types.NewValidatorSet(validators).CopyIncrementAccum(1),
|
||||
Validators: types.NewValidatorSet(validators),
|
||||
NextValidators: nextValidatorSet,
|
||||
Validators: validatorSet,
|
||||
LastValidators: types.NewValidatorSet(nil),
|
||||
LastHeightValidatorsChanged: 1,
|
||||
|
||||
|
@@ -48,6 +48,19 @@ func TestStateCopy(t *testing.T) {
|
||||
%v`, state))
|
||||
}
|
||||
|
||||
//TestMakeGenesisStateNilValidators tests state's consistency when genesis file's validators field is nil.
|
||||
func TestMakeGenesisStateNilValidators(t *testing.T) {
|
||||
doc := types.GenesisDoc{
|
||||
ChainID: "dummy",
|
||||
Validators: nil,
|
||||
}
|
||||
require.Nil(t, doc.ValidateAndComplete())
|
||||
state, err := MakeGenesisState(&doc)
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, 0, len(state.Validators.Validators))
|
||||
require.Equal(t, 0, len(state.NextValidators.Validators))
|
||||
}
|
||||
|
||||
// TestStateSaveLoad tests saving and loading State from a db.
|
||||
func TestStateSaveLoad(t *testing.T) {
|
||||
tearDown, stateDB, state := setupTestCase(t)
|
||||
|
@@ -4,13 +4,13 @@ package version
|
||||
const (
|
||||
Maj = "0"
|
||||
Min = "25"
|
||||
Fix = "0"
|
||||
Fix = "1"
|
||||
)
|
||||
|
||||
var (
|
||||
// Version is the current version of Tendermint
|
||||
// Must be a string because scripts like dist.sh read this file.
|
||||
Version = "0.25.0"
|
||||
Version = "0.25.1"
|
||||
|
||||
// GitCommit is the current HEAD set using ldflags.
|
||||
GitCommit string
|
||||
|
Reference in New Issue
Block a user