Browse Source

Merge pull request #2036 from tendermint/master

Merge master to develop
pull/2040/head
Ethan Buchman 7 years ago
committed by GitHub
parent
commit
7c07235649
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 28 additions and 18 deletions
  1. +9
    -1
      CHANGELOG.md
  2. +1
    -1
      crypto/armor/armor.go
  3. +1
    -1
      crypto/armor/armor_test.go
  4. +1
    -1
      crypto/encoding/amino/amino.go
  5. +1
    -1
      crypto/encoding/amino/encode_test.go
  6. +1
    -1
      crypto/xsalsa20symmetric/symmetric.go
  7. +1
    -1
      crypto/xsalsa20symmetric/symmetric_test.go
  8. +4
    -4
      mempool/mempool.go
  9. +2
    -2
      mempool/mempool_test.go
  10. +3
    -1
      p2p/switch.go
  11. +2
    -2
      state/services.go
  12. +2
    -2
      version/version.go

+ 9
- 1
CHANGELOG.md View File

@ -2,6 +2,10 @@
## TBA
## 0.22.5
*July 23th, 2018*
BREAKING CHANGES:
- [crypto] Refactor `tendermint/crypto` into many subpackages
- [libs/common] remove exponentially distributed random numbers
@ -9,10 +13,13 @@ BREAKING CHANGES:
IMPROVEMENTS:
- [abci, libs/common] Generated gogoproto static marshaller methods
- [config] Increase default send/recv rates to 5 mB/s
- [p2p] allow persistent peers to be private
BUG FIXES
- [mempool] fixed a race condition when `create_empty_blocks=false` where a
transaction is published at an old height.
- [p2p] dial external IP setup by `persistent_peers`, not internal NAT IP
- [rpc] make `/status` RPC endpoint resistant to consensus halt
## 0.22.4
@ -28,7 +35,8 @@ FEATURES:
BUG FIXES:
- [tools/tm-bench] Various fixes
- [consensus] Wait for WAL to stop on shutdown
- [abci] Fix #1891, pending requests cannot hang when abci server dies. Previously a crash in BeginBlock could leave tendermint in broken state.
- [abci] Fix #1891, pending requests cannot hang when abci server dies.
Previously a crash in BeginBlock could leave tendermint in broken state.
## 0.22.3


+ 1
- 1
crypto/armor/armor.go View File

@ -1,4 +1,4 @@
package crypto
package armor
import (
"bytes"


+ 1
- 1
crypto/armor/armor_test.go View File

@ -1,4 +1,4 @@
package crypto
package armor
import (
"testing"


+ 1
- 1
crypto/encoding/amino/amino.go View File

@ -1,4 +1,4 @@
package crypto
package cryptoAmino
import (
amino "github.com/tendermint/go-amino"


+ 1
- 1
crypto/encoding/amino/encode_test.go View File

@ -1,4 +1,4 @@
package crypto
package cryptoAmino
import (
"os"


crypto/xsalsa20Symmetric/symmetric.go → crypto/xsalsa20symmetric/symmetric.go View File


crypto/xsalsa20Symmetric/symmetric_test.go → crypto/xsalsa20symmetric/symmetric_test.go View File


+ 4
- 4
mempool/mempool.go View File

@ -78,7 +78,7 @@ type Mempool struct {
recheckCursor *clist.CElement // next expected response
recheckEnd *clist.CElement // re-checking stops here
notifiedTxsAvailable bool
txsAvailable chan bool // fires once for each height, when the mempool is not empty
txsAvailable chan struct{} // fires once for each height, when the mempool is not empty
// Keep a cache of already-seen txs.
// This reduces the pressure on the proxyApp.
@ -130,7 +130,7 @@ func NewMempool(
// ensuring it will trigger once every height when transactions are available.
// NOTE: not thread safe - should only be called once, on startup
func (mem *Mempool) EnableTxsAvailable() {
mem.txsAvailable = make(chan bool, 1)
mem.txsAvailable = make(chan struct{}, 1)
}
// SetLogger sets the Logger.
@ -348,7 +348,7 @@ func (mem *Mempool) resCbRecheck(req *abci.Request, res *abci.Response) {
// TxsAvailable returns a channel which fires once for every height,
// and only when transactions are available in the mempool.
// NOTE: the returned channel may be nil if EnableTxsAvailable was not called.
func (mem *Mempool) TxsAvailable() <-chan bool {
func (mem *Mempool) TxsAvailable() <-chan struct{} {
return mem.txsAvailable
}
@ -360,7 +360,7 @@ func (mem *Mempool) notifyTxsAvailable() {
// channel cap is 1, so this will send once
mem.notifiedTxsAvailable = true
select {
case mem.txsAvailable <- true:
case mem.txsAvailable <- struct{}{}:
default:
}
}


+ 2
- 2
mempool/mempool_test.go View File

@ -38,7 +38,7 @@ func newMempoolWithApp(cc proxy.ClientCreator) *Mempool {
return mempool
}
func ensureNoFire(t *testing.T, ch <-chan bool, timeoutMS int) {
func ensureNoFire(t *testing.T, ch <-chan struct{}, timeoutMS int) {
timer := time.NewTimer(time.Duration(timeoutMS) * time.Millisecond)
select {
case <-ch:
@ -47,7 +47,7 @@ func ensureNoFire(t *testing.T, ch <-chan bool, timeoutMS int) {
}
}
func ensureFire(t *testing.T, ch <-chan bool, timeoutMS int) {
func ensureFire(t *testing.T, ch <-chan struct{}, timeoutMS int) {
timer := time.NewTimer(time.Duration(timeoutMS) * time.Millisecond)
select {
case <-ch:


+ 3
- 1
p2p/switch.go View File

@ -283,7 +283,9 @@ func (sw *Switch) StopPeerForError(peer Peer, reason interface{}) {
if peer.IsPersistent() {
addr := peer.OriginalAddr()
if addr == nil {
panic(fmt.Sprintf("persistent peer %v with no original address", peer))
// FIXME: persistent peers can't be inbound right now.
// self-reported address for inbound persistent peers
addr = peer.NodeInfo().NetAddress()
}
go sw.reconnectToPeer(addr)
}


+ 2
- 2
state/services.go View File

@ -27,7 +27,7 @@ type Mempool interface {
Flush()
FlushAppConn() error
TxsAvailable() <-chan bool
TxsAvailable() <-chan struct{}
EnableTxsAvailable()
}
@ -43,7 +43,7 @@ func (m MockMempool) Reap(n int) types.Txs { retur
func (m MockMempool) Update(height int64, txs types.Txs) error { return nil }
func (m MockMempool) Flush() {}
func (m MockMempool) FlushAppConn() error { return nil }
func (m MockMempool) TxsAvailable() <-chan bool { return make(chan bool) }
func (m MockMempool) TxsAvailable() <-chan struct{} { return make(chan struct{}) }
func (m MockMempool) EnableTxsAvailable() {}
//------------------------------------------------------


+ 2
- 2
version/version.go View File

@ -4,13 +4,13 @@ package version
const (
Maj = "0"
Min = "22"
Fix = "4"
Fix = "5"
)
var (
// Version is the current version of Tendermint
// Must be a string because scripts like dist.sh read this file.
Version = "0.22.4"
Version = "0.22.5"
// GitCommit is the current HEAD set using ldflags.
GitCommit string


Loading…
Cancel
Save