Repository navigation
Refactor: Updated TransactionError to use util::Expected and removed TransactionError:OK - #35105
kevkevinpal wants to merge 2 commits into
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35105. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
There was a problem hiding this comment.
Approach NACK
I do not think this is the best future proof way to accomplish the goal. In C++ 23 std::expected is introduced, which is a better way (imo) to do for explicit error handling. E.g link link2
Yes we are currently on C++ 20 but a "polyfill" std::expected is already introduced in the code as util::Expected<T, E>
This makes the upgrade path to C++23 an easy search and replace and is a better way to do explicit error handling / remove the ok from the errors.
cad26e6 to
592a833
Compare
592a833 to
1bcea55
Compare
|
rebased and fixed conflicts to 1bcea55 |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
|
Maybe turn into draft while CI is red? |
1bcea55 to
78a2b0d
Compare
|
Maybe turn into draft while CI is red? |
|
Converted to draft, due to failing CI |
78a2b0d to
9b53586
Compare
Summary
Similar to #32958 and motivated by #32958 (review)
We now are using
util::Expectedand removedTransactionError::OKThis makes the enum less confusing because it no longer includes
OK.