Skip to content

Commit

Permalink
Merge pull request #6261 from filecoin-project/chore/bump-v1.14.3
Browse files Browse the repository at this point in the history
chore: bump version to v1.14.3
  • Loading branch information
LinZexiao authored Jan 11, 2024
2 parents 1731d3b + d181856 commit bf71c79
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# venus changelog

## v1.14.3

* fix: index too large may out of range [[#6258](https://github.com/filecoin-project/venus/pull/6258)]

## v1.14.2

* fix: exchange: allow up to 10k messages per block
Expand Down
2 changes: 1 addition & 1 deletion pkg/constants/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// BuildVersion is the local build version, set by build system
const BuildVersion = "1.14.2"
const BuildVersion = "1.14.3"

var CurrentCommit string

Expand Down
8 changes: 7 additions & 1 deletion pkg/net/exchange/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,13 @@ func (c *client) GetFullTipSet(ctx context.Context, peers []peer.ID, tsk types.T
return nil, err
}

return validRes.toFullTipSets()[0], nil
fullTipsets := validRes.toFullTipSets()

if len(fullTipsets) == 0 {
return nil, fmt.Errorf("unexpectedly got no tipsets in exchange")
}

return fullTipsets[0], nil
// If `doRequest` didn't fail we are guaranteed to have at least
// *one* tipset here, so it's safe to index directly.
}
Expand Down
8 changes: 7 additions & 1 deletion venus-component/libp2p/exchange/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ func (c *client) GetFullTipSet(ctx context.Context, peer peer.ID, tsk chain.TipS
return nil, err
}

return validRes.toFullTipSets()[0], nil
fullTipsets := validRes.toFullTipSets()

if len(fullTipsets) == 0 {
return nil, fmt.Errorf("unexpectedly got no tipsets in exchange")
}

return fullTipsets[0], nil
// If `doRequest` didn't fail we are guaranteed to have at least
// *one* tipset here, so it's safe to index directly.
}
Expand Down

0 comments on commit bf71c79

Please sign in to comment.