Merge PR #4403: Paramchange proposal skips omitempty fields

This commit is contained in:
Joon
2019-05-27 20:47:12 -04:00
committed by Alexander Bezobchuk
parent 8fecc7724b
commit 91e75cb74a
16 changed files with 225 additions and 91 deletions
+3 -2
View File
@@ -32,12 +32,13 @@ func handleParameterChangeProposal(ctx sdk.Context, k Keeper, p ParameterChangeP
k.Logger(ctx).Info(
fmt.Sprintf("setting new parameter; key: %s, value: %s", c.Key, c.Value),
)
err = ss.SetRaw(ctx, []byte(c.Key), []byte(c.Value))
err = ss.Update(ctx, []byte(c.Key), []byte(c.Value))
} else {
k.Logger(ctx).Info(
fmt.Sprintf("setting new parameter; key: %s, subkey: %s, value: %s", c.Key, c.Subspace, c.Value),
)
err = ss.SetRawWithSubkey(ctx, []byte(c.Key), []byte(c.Subkey), []byte(c.Value))
err = ss.UpdateWithSubkey(ctx, []byte(c.Key), []byte(c.Subkey), []byte(c.Value))
}
if err != nil {