Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Unify trim_compact_length and trim_compact_weight functions #8362

@coriolinus

Description

@coriolinus

Given that this code runs offchain, not priority but I can clearly see benefit in merging this and compact_weight_trim, given that I think we need to re-do this sorting in both of them, among other duplicate work.

Maybe you can formulate this as a follow issue for yourself.

Originally posted by @kianenigma in #8317 (comment)

There's a lot of duplicate work in those two functions; we can simplify by unifying them.

Could also be worth combining the storage structs as well to reduce read costs, while we're at it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions