Skip to content

ChangeParam tx doesn't reject an invalid value #1617

@msmania

Description

@msmania

If a new param is an invalid JSON string, or the type doesn't match the define one, the protocol just accepts without changing the state. The bug is this line doesn't respect the returned error.

_ = space.Update(ctx, []byte(paramKey), paramValue)

Ideally we should fix this on protocol side. Given that this product is maintenance mode, however, my suggestion is to add some check on client side to prevent it from submitting a tx with an invalid param value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions