Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixups from internal audit #4697

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Oct 15, 2024

Description

This PR addresses some of the minor improvements that were spotted during our internal audit recorded in #3156 (comment)

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins requested a review from a team as a code owner October 15, 2024 22:07
@lehins lehins changed the title Minor fixup from audit Minor fixups from internal audit Oct 15, 2024
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

`returnProposalDeposits` is never called with duplicate proposals, if it
was we would have been in trouble, because then deposit would be
returned into the treasury multiple times, which would be equivalent to
minting ADA.

Considering that this case is impossible anyways it makes more sense to
use more efficient and safer `insert` instead of `insertWith (<>)`
@lehins lehins force-pushed the lehins/minor-changes-from-audit branch from c3cf6d6 to c5297e0 Compare October 17, 2024 21:26
@lehins lehins enabled auto-merge October 17, 2024 21:26
@lehins lehins merged commit 6ddedfc into master Oct 17, 2024
154 checks passed
@lehins lehins deleted the lehins/minor-changes-from-audit branch October 17, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants