Browse Source

Merge in develop and update CHANGELOG.md

pull/3449/head
Ismail Khoffi 6 years ago
parent
commit
48aaccab8f
7 changed files with 15 additions and 17 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +0
    -1
      CHANGELOG_PENDING.md
  3. +1
    -6
      consensus/replay.go
  4. +4
    -4
      docker-compose.yml
  5. +2
    -0
      libs/db/remotedb/grpcdb/server.go
  6. +6
    -3
      types/protobuf.go
  7. +1
    -3
      types/protobuf_test.go

+ 1
- 0
CHANGELOG.md View File

@ -87,6 +87,7 @@ program](https://hackerone.com/tendermint).
- [p2p/conn] [\#3347](https://github.com/tendermint/tendermint/issues/3347) Reject all-zero shared secrets in the Diffie-Hellman step of secret-connection
- [p2p] [\#3369](https://github.com/tendermint/tendermint/issues/3369) Do not panic when filter times out
- [p2p] [\#3359](https://github.com/tendermint/tendermint/pull/3359) Fix reconnecting report duplicate ID error due to race condition between adding peer to peerSet and starting it (@guagualvcha)
- [libs/db/remotedb/grpcdb] [\#3402](https://github.com/tendermint/tendermint/issues/3402) Close Iterator/ReverseIterator after use
## v0.30.2


+ 0
- 1
CHANGELOG_PENDING.md View File

@ -19,4 +19,3 @@
### IMPROVEMENTS:
### BUG FIXES:

+ 1
- 6
consensus/replay.go View File

@ -324,12 +324,7 @@ func (h *Handshaker) ReplayBlocks(
}
if res.ConsensusParams != nil {
// Preserve TimeIotaMs since it's not exposed to the application.
timeIotaMs := state.ConsensusParams.Block.TimeIotaMs
{
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
}
state.ConsensusParams.Block.TimeIotaMs = timeIotaMs
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams, state.ConsensusParams.Block.TimeIotaMs)
}
sm.SaveState(h.stateDB, state)
}


+ 4
- 4
docker-compose.yml View File

@ -8,7 +8,7 @@ services:
- "26656-26657:26656-26657"
environment:
- ID=0
- LOG=$${LOG:-tendermint.log}
- LOG=${LOG:-tendermint.log}
volumes:
- ./build:/tendermint:Z
networks:
@ -22,7 +22,7 @@ services:
- "26659-26660:26656-26657"
environment:
- ID=1
- LOG=$${LOG:-tendermint.log}
- LOG=${LOG:-tendermint.log}
volumes:
- ./build:/tendermint:Z
networks:
@ -34,7 +34,7 @@ services:
image: "tendermint/localnode"
environment:
- ID=2
- LOG=$${LOG:-tendermint.log}
- LOG=${LOG:-tendermint.log}
ports:
- "26661-26662:26656-26657"
volumes:
@ -48,7 +48,7 @@ services:
image: "tendermint/localnode"
environment:
- ID=3
- LOG=$${LOG:-tendermint.log}
- LOG=${LOG:-tendermint.log}
ports:
- "26663-26664:26656-26657"
volumes:


+ 2
- 0
libs/db/remotedb/grpcdb/server.go View File

@ -138,6 +138,7 @@ func (s *server) SetSync(ctx context.Context, in *protodb.Entity) (*protodb.Noth
func (s *server) Iterator(query *protodb.Entity, dis protodb.DB_IteratorServer) error {
it := s.db.Iterator(query.Start, query.End)
defer it.Close()
return s.handleIterator(it, dis.Send)
}
@ -162,6 +163,7 @@ func (s *server) handleIterator(it db.Iterator, sendFunc func(*protodb.Iterator)
func (s *server) ReverseIterator(query *protodb.Entity, dis protodb.DB_ReverseIteratorServer) error {
it := s.db.ReverseIterator(query.Start, query.End)
defer it.Close()
return s.handleIterator(it, dis.Send)
}


+ 6
- 3
types/protobuf.go View File

@ -221,7 +221,9 @@ func (pb2tm) ValidatorUpdates(vals []abci.ValidatorUpdate) ([]*Validator, error)
return tmVals, nil
}
func (pb2tm) ConsensusParams(csp *abci.ConsensusParams) ConsensusParams {
// BlockParams.TimeIotaMs is not exposed to the application. Therefore a caller
// must provide it.
func (pb2tm) ConsensusParams(csp *abci.ConsensusParams, blockTimeIotaMs int64) ConsensusParams {
params := ConsensusParams{
Block: BlockParams{},
Evidence: EvidenceParams{},
@ -231,8 +233,9 @@ func (pb2tm) ConsensusParams(csp *abci.ConsensusParams) ConsensusParams {
// we must defensively consider any structs may be nil
if csp.Block != nil {
params.Block = BlockParams{
MaxBytes: csp.Block.MaxBytes,
MaxGas: csp.Block.MaxGas,
MaxBytes: csp.Block.MaxBytes,
MaxGas: csp.Block.MaxGas,
TimeIotaMs: blockTimeIotaMs,
}
}


+ 1
- 3
types/protobuf_test.go View File

@ -64,9 +64,7 @@ func TestABCIValidators(t *testing.T) {
func TestABCIConsensusParams(t *testing.T) {
cp := DefaultConsensusParams()
abciCP := TM2PB.ConsensusParams(cp)
cp2 := PB2TM.ConsensusParams(abciCP)
// TimeIotaMs is not exposed to the application.
cp2.Block.TimeIotaMs = cp.Block.TimeIotaMs
cp2 := PB2TM.ConsensusParams(abciCP, cp.Block.TimeIotaMs)
assert.Equal(t, *cp, cp2)
}


Loading…
Cancel
Save