Skip to content

Why are there multiple InternalOutputSubstitutionError::OutputSubstitutionDisabled(& str) variants? #588

Closed

Description

@DanGould

I'm confused why there are multiple OutputSubstitutionDisabled(&str) variants instead of two sub-variants that don't take string context.

I see:

1

InternalOutputSubstitutionError::OutputSubstitutionDisabled(
                                    "Decreasing the receiver output value is not allowed",
                                )

2

InternalOutputSubstitutionError::OutputSubstitutionDisabled(
                                    "Changing the receiver output script pubkey is not allowed",
                                )

Of which the one appropriate error would be better named

InternalOutputSubstitutionError::Disabled

Originally posted by @DanGould in #546 (comment)

Activity

  1. added
    enhancement
    on Mar 18, 2025
  2. spacebear21 commented on Mar 18, 2025

    @spacebear21
    Collaborator

    Having two sub-variants instead of string context makes sense imo.

  3. benalleng commented on Mar 18, 2025

    @benalleng
    Collaborator

    I can go ahead and make a new sub-variant for these if you don't plan on including a fix in #546

  4. DanGould commented on Mar 18, 2025

    @DanGould
    MemberAuthor

    yes please @benalleng

  5. added a commit that references this issue on Mar 24, 2025
    8c2a6b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions