mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-26 15:22:15 +00:00
Merge pull request #3449 from tendermint/ismail/merge_develop_into_release/0.31.0
Merge develop into release/0.31.0
This commit is contained in:
commit
5f68fbae37
@ -81,6 +81,7 @@ program](https://hackerone.com/tendermint).
|
|||||||
### BUG FIXES:
|
### BUG FIXES:
|
||||||
- [blockchain] [\#3358](https://github.com/tendermint/tendermint/pull/3358) Fix timer leak in `BlockPool` (@guagualvcha)
|
- [blockchain] [\#3358](https://github.com/tendermint/tendermint/pull/3358) Fix timer leak in `BlockPool` (@guagualvcha)
|
||||||
- [cmd] [\#3408](https://github.com/tendermint/tendermint/issues/3408) Fix `testnet` command's panic when creating non-validator configs (using `--n` flag) (@srmo)
|
- [cmd] [\#3408](https://github.com/tendermint/tendermint/issues/3408) Fix `testnet` command's panic when creating non-validator configs (using `--n` flag) (@srmo)
|
||||||
|
- [libs/db/remotedb/grpcdb] [\#3402](https://github.com/tendermint/tendermint/issues/3402) Close Iterator/ReverseIterator after use
|
||||||
- [libs/pubsub] [\#951](https://github.com/tendermint/tendermint/issues/951), [\#1880](https://github.com/tendermint/tendermint/issues/1880) Use non-blocking send when dispatching messages [ADR-33](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-033-pubsub.md)
|
- [libs/pubsub] [\#951](https://github.com/tendermint/tendermint/issues/951), [\#1880](https://github.com/tendermint/tendermint/issues/1880) Use non-blocking send when dispatching messages [ADR-33](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-033-pubsub.md)
|
||||||
- [lite] [\#3364](https://github.com/tendermint/tendermint/issues/3364) Fix `/validators` and `/abci_query` proxy endpoints
|
- [lite] [\#3364](https://github.com/tendermint/tendermint/issues/3364) Fix `/validators` and `/abci_query` proxy endpoints
|
||||||
(@guagualvcha)
|
(@guagualvcha)
|
||||||
|
@ -19,4 +19,3 @@
|
|||||||
### IMPROVEMENTS:
|
### IMPROVEMENTS:
|
||||||
|
|
||||||
### BUG FIXES:
|
### BUG FIXES:
|
||||||
|
|
||||||
|
@ -324,12 +324,7 @@ func (h *Handshaker) ReplayBlocks(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if res.ConsensusParams != nil {
|
if res.ConsensusParams != nil {
|
||||||
// Preserve TimeIotaMs since it's not exposed to the application.
|
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams, state.ConsensusParams.Block.TimeIotaMs)
|
||||||
timeIotaMs := state.ConsensusParams.Block.TimeIotaMs
|
|
||||||
{
|
|
||||||
state.ConsensusParams = types.PB2TM.ConsensusParams(res.ConsensusParams)
|
|
||||||
}
|
|
||||||
state.ConsensusParams.Block.TimeIotaMs = timeIotaMs
|
|
||||||
}
|
}
|
||||||
sm.SaveState(h.stateDB, state)
|
sm.SaveState(h.stateDB, state)
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ services:
|
|||||||
- "26656-26657:26656-26657"
|
- "26656-26657:26656-26657"
|
||||||
environment:
|
environment:
|
||||||
- ID=0
|
- ID=0
|
||||||
- LOG=$${LOG:-tendermint.log}
|
- LOG=${LOG:-tendermint.log}
|
||||||
volumes:
|
volumes:
|
||||||
- ./build:/tendermint:Z
|
- ./build:/tendermint:Z
|
||||||
networks:
|
networks:
|
||||||
@ -22,7 +22,7 @@ services:
|
|||||||
- "26659-26660:26656-26657"
|
- "26659-26660:26656-26657"
|
||||||
environment:
|
environment:
|
||||||
- ID=1
|
- ID=1
|
||||||
- LOG=$${LOG:-tendermint.log}
|
- LOG=${LOG:-tendermint.log}
|
||||||
volumes:
|
volumes:
|
||||||
- ./build:/tendermint:Z
|
- ./build:/tendermint:Z
|
||||||
networks:
|
networks:
|
||||||
@ -34,7 +34,7 @@ services:
|
|||||||
image: "tendermint/localnode"
|
image: "tendermint/localnode"
|
||||||
environment:
|
environment:
|
||||||
- ID=2
|
- ID=2
|
||||||
- LOG=$${LOG:-tendermint.log}
|
- LOG=${LOG:-tendermint.log}
|
||||||
ports:
|
ports:
|
||||||
- "26661-26662:26656-26657"
|
- "26661-26662:26656-26657"
|
||||||
volumes:
|
volumes:
|
||||||
@ -48,7 +48,7 @@ services:
|
|||||||
image: "tendermint/localnode"
|
image: "tendermint/localnode"
|
||||||
environment:
|
environment:
|
||||||
- ID=3
|
- ID=3
|
||||||
- LOG=$${LOG:-tendermint.log}
|
- LOG=${LOG:-tendermint.log}
|
||||||
ports:
|
ports:
|
||||||
- "26663-26664:26656-26657"
|
- "26663-26664:26656-26657"
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -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 {
|
func (s *server) Iterator(query *protodb.Entity, dis protodb.DB_IteratorServer) error {
|
||||||
it := s.db.Iterator(query.Start, query.End)
|
it := s.db.Iterator(query.Start, query.End)
|
||||||
|
defer it.Close()
|
||||||
return s.handleIterator(it, dis.Send)
|
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 {
|
func (s *server) ReverseIterator(query *protodb.Entity, dis protodb.DB_ReverseIteratorServer) error {
|
||||||
it := s.db.ReverseIterator(query.Start, query.End)
|
it := s.db.ReverseIterator(query.Start, query.End)
|
||||||
|
defer it.Close()
|
||||||
return s.handleIterator(it, dis.Send)
|
return s.handleIterator(it, dis.Send)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +221,9 @@ func (pb2tm) ValidatorUpdates(vals []abci.ValidatorUpdate) ([]*Validator, error)
|
|||||||
return tmVals, nil
|
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{
|
params := ConsensusParams{
|
||||||
Block: BlockParams{},
|
Block: BlockParams{},
|
||||||
Evidence: EvidenceParams{},
|
Evidence: EvidenceParams{},
|
||||||
@ -233,6 +235,7 @@ func (pb2tm) ConsensusParams(csp *abci.ConsensusParams) ConsensusParams {
|
|||||||
params.Block = BlockParams{
|
params.Block = BlockParams{
|
||||||
MaxBytes: csp.Block.MaxBytes,
|
MaxBytes: csp.Block.MaxBytes,
|
||||||
MaxGas: csp.Block.MaxGas,
|
MaxGas: csp.Block.MaxGas,
|
||||||
|
TimeIotaMs: blockTimeIotaMs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,9 +64,7 @@ func TestABCIValidators(t *testing.T) {
|
|||||||
func TestABCIConsensusParams(t *testing.T) {
|
func TestABCIConsensusParams(t *testing.T) {
|
||||||
cp := DefaultConsensusParams()
|
cp := DefaultConsensusParams()
|
||||||
abciCP := TM2PB.ConsensusParams(cp)
|
abciCP := TM2PB.ConsensusParams(cp)
|
||||||
cp2 := PB2TM.ConsensusParams(abciCP)
|
cp2 := PB2TM.ConsensusParams(abciCP, cp.Block.TimeIotaMs)
|
||||||
// TimeIotaMs is not exposed to the application.
|
|
||||||
cp2.Block.TimeIotaMs = cp.Block.TimeIotaMs
|
|
||||||
|
|
||||||
assert.Equal(t, *cp, cp2)
|
assert.Equal(t, *cp, cp2)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user