mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Merge pull request #1974 from tendermint/master
Merge master back to develop
This commit is contained in:
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,13 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## TBD
|
||||
## 0.22.4
|
||||
|
||||
IMPROVEMENTS:
|
||||
*July 14th, 2018*
|
||||
|
||||
BREAKING CHANGES:
|
||||
- [genesis] removed deprecated `app_options` field.
|
||||
- [types] Genesis.AppStateJSON -> Genesis.AppState
|
||||
|
||||
FEATURES:
|
||||
- [tools] Merged in from github.com/tendermint/tools
|
||||
|
||||
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.
|
||||
|
||||
## 0.22.3
|
||||
|
||||
*July 10th, 2018*
|
||||
|
||||
IMPROVEMENTS
|
||||
- Update dependencies
|
||||
* pin all values in Gopkg.toml to version or commit
|
||||
@@ -29,7 +41,6 @@ BUG FIXES
|
||||
- NOTE: this is only for URI requests. JSONRPC requests and all responses
|
||||
will use quoted integers (the proto3 JSON standard).
|
||||
- [consensus] Fix halt on shutdown
|
||||
- [tm_bench] Fix method of computing start time, and end time
|
||||
|
||||
## 0.22.1
|
||||
|
||||
@@ -46,8 +57,6 @@ BUG FIXES
|
||||
already in the validator set.
|
||||
* [consensus] Shut down WAL properly.
|
||||
|
||||
BUG FIXES:
|
||||
- [abci] Fix #1891, pending requests cannot hang when abci server dies. Previously a crash in BeginBlock could leave tendermint in broken state.
|
||||
|
||||
## 0.22.0
|
||||
|
||||
|
@@ -163,6 +163,8 @@ func (s *Server) Subscribe(ctx context.Context, clientID string, query Query, ou
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case <-s.Quit():
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,6 +192,8 @@ func (s *Server) Unsubscribe(ctx context.Context, clientID string, query Query)
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case <-s.Quit():
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,6 +215,8 @@ func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error {
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case <-s.Quit():
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +235,8 @@ func (s *Server) PublishWithTags(ctx context.Context, msg interface{}, tags TagM
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case <-s.Quit():
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
10
node/node.go
10
node/node.go
@@ -486,9 +486,16 @@ func (n *Node) OnStop() {
|
||||
n.BaseService.OnStop()
|
||||
|
||||
n.Logger.Info("Stopping Node")
|
||||
|
||||
// first stop the non-reactor services
|
||||
n.eventBus.Stop()
|
||||
n.indexerService.Stop()
|
||||
|
||||
// now stop the reactors
|
||||
// TODO: gracefully disconnect from peers.
|
||||
n.sw.Stop()
|
||||
|
||||
// finally stop the listeners / external services
|
||||
for _, l := range n.rpcListeners {
|
||||
n.Logger.Info("Closing rpc listener", "listener", l)
|
||||
if err := l.Close(); err != nil {
|
||||
@@ -496,9 +503,6 @@ func (n *Node) OnStop() {
|
||||
}
|
||||
}
|
||||
|
||||
n.eventBus.Stop()
|
||||
n.indexerService.Stop()
|
||||
|
||||
if pvsc, ok := n.privValidator.(*privval.SocketPV); ok {
|
||||
if err := pvsc.Stop(); err != nil {
|
||||
n.Logger.Error("Error stopping priv validator socket client", "err", err)
|
||||
|
@@ -2,6 +2,9 @@ package node
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -43,6 +46,13 @@ func TestNodeStartStop(t *testing.T) {
|
||||
select {
|
||||
case <-n.Quit():
|
||||
case <-time.After(5 * time.Second):
|
||||
pid := os.Getpid()
|
||||
p, err := os.FindProcess(pid)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = p.Signal(syscall.SIGABRT)
|
||||
fmt.Println(err)
|
||||
t.Fatal("timed out waiting for shutdown")
|
||||
}
|
||||
}
|
||||
|
@@ -4,9 +4,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
|
||||
)
|
||||
|
||||
const defaultCapacity = 0
|
||||
@@ -49,7 +49,7 @@ func (b *EventBus) OnStart() error {
|
||||
}
|
||||
|
||||
func (b *EventBus) OnStop() {
|
||||
b.pubsub.OnStop()
|
||||
b.pubsub.Stop()
|
||||
}
|
||||
|
||||
func (b *EventBus) Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, out chan<- interface{}) error {
|
||||
|
@@ -4,13 +4,13 @@ package version
|
||||
const (
|
||||
Maj = "0"
|
||||
Min = "22"
|
||||
Fix = "3"
|
||||
Fix = "4"
|
||||
)
|
||||
|
||||
var (
|
||||
// Version is the current version of Tendermint
|
||||
// Must be a string because scripts like dist.sh read this file.
|
||||
Version = "0.22.3"
|
||||
Version = "0.22.4"
|
||||
|
||||
// GitCommit is the current HEAD set using ldflags.
|
||||
GitCommit string
|
||||
|
Reference in New Issue
Block a user