Skip to content

IRISHUB-349:finish the TallyingProcedure parameter#275

Merged
wukongcheng merged 8 commits intoirisnet:feature/govfrom
MrXJC:jiacheng/gov
Sep 20, 2018
Merged

IRISHUB-349:finish the TallyingProcedure parameter#275
wukongcheng merged 8 commits intoirisnet:feature/govfrom
MrXJC:jiacheng/gov

Conversation

@MrXJC
Copy link
Contributor

@MrXJC MrXJC commented Sep 20, 2018

No description provided.

cdc.MustUnmarshalBinary(res, &p)
ToParamStr(p, keyStr)
default:
return errors.New(keyStr+" is not found")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

define error in error.go

case "Gov/gov/TallyingProcedure":
jsonBytes,_ = json.Marshal(paramDoc.Govparams.TallyingProcedure)
valueStr = string(jsonBytes)
default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reuse the same code block above

func (keeper Keeper) GetTallyingProcedure(ctx sdk.Context) govparams.TallyingProcedure {
govparams.TallyingProcedureParameter.LoadValue(ctx)
return govparams.TallyingProcedureParameter.Value
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this func should be in params/utils.go

@wukongcheng wukongcheng merged commit bb0ff1e into irisnet:feature/gov Sep 20, 2018
wangjiulian pushed a commit that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants