Skip to content

Commit

Permalink
Merge pull request #330 from MinterTeam/dev
Browse files Browse the repository at this point in the history
v1.1.7
  • Loading branch information
danil-lashin authored Apr 9, 2020
2 parents 6fc0f20 + b7b31a6 commit e82123c
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 20 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.1.7

IMPROVEMENT

- [tendermint] Upgrade to [v0.33.3](https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md#v0333)

BUG FIXES

- [dashboard] Some minor fixes

## 1.1.6

IMPROVEMENT
Expand Down
44 changes: 27 additions & 17 deletions cli/service/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ func (mc *ManagerConsole) Cli(ctx context.Context) {
t := prompt.Input(">>> ", completer,
prompt.OptionHistory(history),
prompt.OptionShowCompletionAtStart(),
prompt.OptionAddKeyBind(prompt.KeyBind{
Key: prompt.ControlC,
Fn: func(b *prompt.Buffer) {
os.Exit(0)
},
}),
)
if err := mc.Execute(strings.Fields(t)); err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
Expand Down Expand Up @@ -197,35 +203,39 @@ func dashboardCMD(client pb.ManagerServiceClient) func(c *cli.Context) error {
return err
}
ui.SetKeybinding("Esc", func() { ui.Quit() })
ui.SetKeybinding("Ctrl+C", func() { ui.Quit() })
ui.SetKeybinding("q", func() { ui.Quit() })
errCh := make(chan error)

recv, err := response.Recv()
if err == io.EOF {
return nil
}
if err != nil {
return err
}
dashboard := updateDashboard(box, recv)
recvCh := make(chan *pb.DashboardResponse)

go func() { errCh <- ui.Run() }()
go func() {
for {
recv, err := response.Recv()
if err == io.EOF {
close(errCh)
return
}
if err != nil {
errCh <- err
return
}
recvCh <- recv
}
}()

var dashboardFunc func(recv *pb.DashboardResponse)
for {
select {
case <-c.Done():
return c.Err()
case err := <-errCh:
return err
case <-time.After(time.Second):
recv, err := response.Recv()
if err == io.EOF {
return nil
}
if err != nil {
return err
case recv := <-recvCh:
if dashboardFunc == nil {
dashboardFunc = updateDashboard(box, recv)
}
dashboard(recv)
dashboardFunc(recv)
ui.Repaint()
}
}
Expand Down
4 changes: 4 additions & 0 deletions core/statistics/statistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ func (d *Data) GetAverageBlockProcessingTime() int64 {
d.BlockEnd.RLock()
defer d.BlockEnd.RUnlock()

if d.BlockEnd.LastBlockInfo.Height == d.Speed.startHeight {
return 0
}

return d.Speed.duration / (d.BlockEnd.LastBlockInfo.Height - d.Speed.startHeight)
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d
github.com/tendermint/go-amino v0.15.1
github.com/tendermint/iavl v0.13.2
github.com/tendermint/tendermint v0.33.2
github.com/tendermint/tendermint v0.33.3
github.com/tendermint/tm-db v0.5.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5
github.com/urfave/cli/v2 v2.0.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,8 @@ github.com/tendermint/tendermint v0.32.6/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8
github.com/tendermint/tendermint v0.32.8/go.mod h1:5/B1XZjNYtVBso8o1l/Eg4A0Mhu42lDcmftoQl95j/E=
github.com/tendermint/tendermint v0.33.2 h1:NzvRMTuXJxqSsFed2J7uHmMU5N1CVzSpfi3nCc882KY=
github.com/tendermint/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk=
github.com/tendermint/tendermint v0.33.3 h1:6lMqjEoCGejCzAghbvfQgmw87snGSqEhDTo/jw+W8CI=
github.com/tendermint/tendermint v0.33.3/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk=
github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw=
github.com/tendermint/tm-db v0.2.0 h1:rJxgdqn6fIiVJZy4zLpY1qVlyD0TU6vhkT4kEf71TQQ=
github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw=
Expand Down
4 changes: 2 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ package version
const (
Maj = "1"
Min = "1"
Fix = "6"
Fix = "7"

AppVer = 6
)

var (
// Must be a string because scripts like dist.sh read this file.
Version = "1.1.6"
Version = "1.1.7"

// GitCommit is the current HEAD set using ldflags.
GitCommit string
Expand Down

0 comments on commit e82123c

Please sign in to comment.