Skip to content

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

@DanGould

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions