ElementsProject / ElementsProject/elements

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

Offen
#1,199 2 Kommentare 0 Reaktionen 1 zugewiesene Person Zugewiesen an @jamesdorfman Auf GitHub ansehen
enhancement
Vorherrschende Sprache
C++
Sterne
1.2k
Forks
417
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
15

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.