Skip to content

BlindTransaction() and VerifyAmounts() need detailed error return codes #1199

@philippem

Description

@philippem

The functions BlindTransaction() and VerifyAmounts() each have several failure paths, but only use -1 and false to indicate to the caller that an operation failed. This makes it difficult to report helpful error messages to the user.

The error paths could return an enum indicating the reason for failure, and the callers could then surface error strings to the user.

BlindTransaction(): https://github.com/ElementsProject/elements/blob/master/src/blind.cpp#L286
VerifyAmounts(): https://github.com/ElementsProject/elements/blob/master/src/confidential_validation.cpp#L134

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions