Skip to content

Removed TxField #5120

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Removed TxField #5120

wants to merge 1 commit into from

Conversation

Soupstraw
Copy link
Contributor

Description

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@Soupstraw Soupstraw force-pushed the jj/generic-updates-removal branch from 452c5ff to 0f11d04 Compare June 16, 2025 12:45
@@ -399,6 +401,11 @@ instance Era era => Monoid (TxDats era) where
-- | Encodes memoized bytes created upon construction.
instance Era era => EncCBOR (TxDats era)

instance Era era => IsList (TxDats era) where
type Item (TxDats era) = Data era
fromList = foldr' (\x -> (TxDats (Map.singleton (hashData x) x) <>)) mempty
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have a nice fromElems helper for this

Suggested change
fromList = foldr' (\x -> (TxDats (Map.singleton (hashData x) x) <>)) mempty
fromList = TxDats . fromElems hashData

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