-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): minor audit improvements (#5486)
Description --- fix(core): make max_input_maturity fallible add details on the usage of core hash domains include details on all fallible transaction input methods minor comment update in coinbase_builder fix(core/aggregate_body): remove unused buggy function min_input_maturity tests(core/aggregate_body_validator): add test for unsorted aggregate body and comment on new_sorted_unchecked call chore(core/transaction_builder): remove unnecessary mutation for more ergonomic api chore(core): improve clarity of check_coinbase_output fix(core): remove unused git link for monero Motivation and Context --- max_input_maturity: should be fallible rather than possibly return the incorrect result. min_input_maturity: returns an incorrect result (u64::MAX) if there are no inputs. Removed because it was unused. check_coinbase_output: had unwraps and a comment indicating something _should_ happen to prevent the panic. For clarity, updated the code so that it can easily be seen as correct. transaction_builder: add components with a mutable reference, possibly unclear how the references are mutated. More ergonomic and useful to pass in an iterator. monero dependency was using a git link and `version` ambiguously. Cargo seemed to use the crate and ignore the git field. Added an explicit test for validation failure on unordered tx components in an aggregate body. How Has This Been Tested? --- Existing tests and new unit test What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain --> --------- Co-authored-by: SW van Heerden <[email protected]>
- Loading branch information
1 parent
fef701e
commit 8756e0b
Showing
38 changed files
with
276 additions
and
258 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.