elements icon indicating copy to clipboard operation
elements copied to clipboard

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

Open philippem opened this issue 3 years ago • 2 comments

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

philippem avatar Dec 22 '22 15:12 philippem

Is there any work currently being done on this? if not, please assign.

brandon-bb avatar Jan 15 '23 11:01 brandon-bb

Hey @CrypticBantu - sorry for the confusion! Will hack on this as soon as possible, apologies for the inconvenience.

delta1 avatar Jan 15 '23 13:01 delta1