IRISHUB-447:refactor the ParameterDoc#280
Merged
wukongcheng merged 5 commits intoirisnet:feature/govfrom Sep 25, 2018
MrXJC:jiacheng/gov
Merged
IRISHUB-447:refactor the ParameterDoc#280wukongcheng merged 5 commits intoirisnet:feature/govfrom MrXJC:jiacheng/gov
wukongcheng merged 5 commits intoirisnet:feature/govfrom
MrXJC:jiacheng/gov
Conversation
wukongcheng
reviewed
Sep 21, 2018
client/gov/cli/query.go
Outdated
| Govparams govparams.ParamSet `json:"gov"` | ||
| } | ||
|
|
||
| func (pd *ParameterDoc) ReadFile(cdc *wire.Codec,pathStr string) error { |
Contributor
There was a problem hiding this comment.
how about ParameterConfigFile ? Not a general document
wukongcheng
reviewed
Sep 21, 2018
| parameter.RegisterGovParamMapping(&govparams.DepositProcedureParameter, | ||
| &govparams.VotingProcedureParameter, | ||
| &govparams.TallyingProcedureParameter,) | ||
|
|
Contributor
There was a problem hiding this comment.
Move 'parameter.RegisterGovParamMapping' into a utils.go.
wukongcheng
reviewed
Sep 21, 2018
| cdc.MustUnmarshalBinary(kv.Value, &pd.Govparams.TallyingProcedure) | ||
| default: | ||
| return sdk.NewError(parameter.DefaultCodespace, parameter.CodeInvalidTallyingProcedure, fmt.Sprintf(string(kv.Key)+" is not found")) | ||
| } |
Contributor
There was a problem hiding this comment.
Use the following code block:
if p , ok:=parameter.ParamMapping[kv.Key]; ok {
p.GetValueFromRawData(cdc, kv.Value)
pd.Govparams.Update(kv.Key, p)
}
Instead of the switch case ?
Contributor
Author
There was a problem hiding this comment.
No, it is different.
wukongcheng
approved these changes
Sep 25, 2018
wangjiulian
pushed a commit
that referenced
this pull request
Nov 7, 2024
`FundSelfBond` should be an optional param
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.