Skip to content

Incorrect error code mapping in check_proposal_tx description #3190

@grarco

Description

@grarco

Reported by Informal Systems.

Description

The check_proposal_tx function contains error codes that are not correctly mapped to their corresponding IDs in the description comment. This discrepancy can lead to confusion and potential misinterpretation of error conditions. For example, the error code WasmRuntimeError is listed as 3 in the function's description comment, but it is defined as 1 in the ResultCode enum, not 3 as indicated in the comment. Additionally, some error codes are not listed at all in the function's description comment, leading to incomplete documentation.

Problem Scenarios

Developers relying on the error code documentation within the description comment of the check_proposal_tx function may encounter confusion considering discrepancies between the documented error codes and their actual definitions.

Recommendation

To ensure consistency and accuracy, it is recommended to align the error code documentation in the description
comment of the check_proposal_tx function (/process_proposal.rs#L174-L184) with the definitions in the ResultCode enum (/mod.rs#L55-L86).

Metadata

Metadata

Assignees

Labels

auditdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions