Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
63 stars 30 forks source link

fix: fetch a failed proposal tally from proposal.FinalTallyResult in the gprc query #1304

Closed 170210 closed 4 months ago

170210 commented 4 months ago

Description

The TallyResult() is used to fetch the tally result from a proposal, in which the case when a proposal fails does not provide the correct information as this case has been branched into the default case. This pr cherry-pick the following pr:

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

CLAassistant commented 4 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: 170210
:x: traviolus
You have signed the CLA already but the status is still pending? Let us recheck it.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.43%. Comparing base (1038a39) to head (39d1651).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1304/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## main #1304 +/- ## ======================================= Coverage 70.42% 70.43% ======================================= Files 643 643 Lines 54730 54730 ======================================= + Hits 38546 38547 +1 + Misses 14011 14010 -1 Partials 2173 2173 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1304?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/gov/keeper/grpc\_query.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1304?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9nb3Yva2VlcGVyL2dycGNfcXVlcnkuZ28=) | `76.38% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1304/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)