Skip to content

Commit

Permalink
Merge pull request #246 from MinterTeam/dev
Browse files Browse the repository at this point in the history
v0.20.3
  • Loading branch information
danil-lashin authored Apr 23, 2019
2 parents 374cd7a + 171ccd0 commit 57e6f7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.20.3

BUG FIXES

- [api] Fix block signatures

## 0.20.2

BUG FIXES
Expand Down
9 changes: 7 additions & 2 deletions api/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ func Block(height int64) (*BlockResponse, error) {
return nil, rpctypes.RPCError{Code: 404, Message: "Block results not found", Data: err.Error()}
}

tmValidators, err := client.Validators(&height)
valHeight := height - 1
if valHeight < 1 {
valHeight = 1
}
tmValidators, err := client.Validators(&valHeight)
if err != nil {
return nil, rpctypes.RPCError{Code: 404, Message: "Validators for block not found", Data: err.Error()}
}
Expand Down Expand Up @@ -99,9 +103,10 @@ func Block(height int64) (*BlockResponse, error) {
}
}

validators := make([]BlockValidatorResponse, len(block.Block.LastCommit.Precommits))
var validators []BlockValidatorResponse
proposer := types.Pubkey{}
if height > 1 {
validators = make([]BlockValidatorResponse, len(tmValidators.Validators))
for i, tmval := range tmValidators.Validators {
signed := false
for _, vote := range block.Block.LastCommit.Precommits {
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 = "0"
Min = "20"
Fix = "2"
Fix = "3"

AppVer = 4
)

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

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

0 comments on commit 57e6f7c

Please sign in to comment.