Skip to content

ICS4: Suggestions for code improvement in channel handshake related code #529

@milosevic

Description

@milosevic

Surfaced from Informal Systems IBC Audit of cosmos-sdk hash cosmos/cosmos-sdk@6344d62.

  • Basic validation
    of MsgChanOpenTry contains business logic. The same check is done also here.

  • in ChanOpenTry function, found at line
    is the same as found at line,
    so the latter is redundant. As found variable is overwritten several times, renaming of this variable
    is needed to simplify the logic.

  • Using "" as a special value
    (see line)
    seems like bad practice. It would probably be better defining it as a constant.

  • in function
    it might be better passing connectionId or conectionEnd as it already fetched at the calling point (for example
    see line)
    instead of channel. Then line can be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from-reviewFeedback / alterations from specification review.implementationTracking an external implementation of the spec.taoTransport, authentication, & ordering layer.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions