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

Revise error name to WithdrawalNotBeneficial. #3583

Merged
merged 2 commits into from
Nov 15, 2022

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented Nov 14, 2022

Issue Number

None. Noticed while reviewing #3555.

Description

This PR renames ErrWithdrawalNotWorth to ErrWithdrawalNotBeneficial.

The wording of the former error name is broken. We can say "a withdrawal is not worth it", but saying something is "not worth" (without the "it") just doesn't make sense in English.

Compatibility

Usages of the JSON error code withdrawal_not_worth are very rare: Usages of withdrawal_not_worth.

These rare cases can easily be updated with a tiny PR or two.

iohk-bors bot added a commit that referenced this pull request Nov 14, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 15, 2022

try

Build failed:

Failures:

  integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs:1217:25: 
  1) API Specifications, SHELLEY_STAKE_POOLS, STAKE_POOLS_SMASH_01 - fetching metadata from SMASH works with delisted pools
       While verifying value:
         ( Status
             { statusCode = 200
             , statusMessage = "OK"
             }
         , Right
             [ StakePool
                 { id = PoolId
                     { getPoolId = "ì(ó=ËæÖ@
                     \x1e^3\x9bÐd|\x9sÊl\xcù»æ\x83\x8dÆ" }
                 , metrics = StakePoolMetrics
                     { nonMyopicMemberRewards = Quantity 645679392809618
                     , relativeStake = Quantity
                         ( Percentage
                             ( 47 % 625 )
                         )
                     , saturation = 0.22560640457880857
                     , producedBlocks = Quantity 887
                     }
                 , metadata = Just
                     ( StakePoolMetadata
                         { ticker = StakePoolTicker
                             { unStakePoolTicker = "GPA" }
                         , name = "Genesis Pool A"
                         , description = Nothing
                         , homepage = "https://iohk.io"
                         }
                     )
                 , cost = Quantity 0
                 , margin = Quantity
                     ( Percentage
                         ( 1 % 10 )
                     )
                 , pledge = Quantity 200000000000000
                 , retirement = Nothing
                 , flags = []
                 }
             , StakePool
                 { id = PoolId
                     { getPoolId = "»\x11L³}uú\x5&\x3(Â5£Úâ\x95£=\xb¦t¥ë\x1e>V\x8e" }
                 , metrics = StakePoolMetrics
                     { nonMyopicMemberRewards = Quantity 645650264555261
                     , relativeStake = Quantity
                         ( Percentage
                             ( 577 % 10000 )
                         )
                     , saturation = 0.17317139845020696
                     , producedBlocks = Quantity 624
                     }
                 , metadata = Just
                     ( StakePoolMetadata
                         { ticker = StakePoolTicker
                             { unStakePoolTicker = "GPD" }
                         , name = "Genesis Pool D"
                         , description = Just "Lorem Ipsum Dolor Sit Amet."
                         , homepage = "https://iohk.io"
                         }
                     )
                 , cost = Quantity 0
                 , margin = Quantity
                     ( Percentage
                         ( 1 % 10 )
                     )
                 , pledge = Quantity 100000000000000
                 , retirement = Just
                     ( EpochInfo
                         { epochNumber = EpochNo
                             { unEpochNo = 1000000 }
                         , epochStartTime = 2023-11-20 09:10:17 UTC
                         }
                     )
                 , flags = []
                 }
             , StakePool
                 { id = PoolId
                     { getPoolId = "´WhÁ¢ÚKÑ>¼ª\x1e¥\x14\x8í£\x1dÌ!v\ËÔ\x7Í©ò" }
                 , metrics = StakePoolMetrics
                     { nonMyopicMemberRewards = Quantity 645650264555261
                     , relativeStake = Quantity
                         ( Percentage
                             ( 601 % 10000 )
                         )
                     , saturation = 0.18041148656410866
                     , producedBlocks = Quantity 678
                     }
                 , metadata = Just
                     ( StakePoolMetadata
                         { ticker = StakePoolTicker
                             { unStakePoolTicker = "GPC" }
                         , name = "Genesis Pool C"
                         , description = Just "Lorem Ipsum Dolor Sit Amet."
                         , homepage = "https://iohk.io"
                         }
                     )
                 , cost = Quantity 0
                 , margin = Quantity
                     ( Percentage
                         ( 1 % 10 )
                     )
                 , pledge = Quantity 100000000000000
                 , retirement = Just
                     ( EpochInfo
                         { epochNumber = EpochNo
                             { unEpochNo = 100000 }
                         , epochStartTime = 2022-12-22 01:10:17 UTC
                         }
                     )
                 , flags = []
                 }
             ]
         )
       
       Waited longer than 300s to resolve action: "metadata is fetched".
       expected: [PoolId {getPoolId = "\180Wh\193\162\218K\209>\188\170\RS\165\DC4\b\237\163\GS\204!v\\\203\212\a\205\169\242"}]
        but got: []

  To rerun use: --match "/API Specifications/SHELLEY_STAKE_POOLS/STAKE_POOLS_SMASH_01 - fetching metadata from SMASH works with delisted pools/"

#2331

@jonathanknowles jonathanknowles self-assigned this Nov 15, 2022
@jonathanknowles jonathanknowles marked this pull request as ready for review November 15, 2022 01:42
@jonathanknowles
Copy link
Member Author

bors try

iohk-bors bot added a commit that referenced this pull request Nov 15, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 15, 2022

try

Build succeeded:

Copy link
Contributor

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

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

LGTM.

@jonathanknowles
Copy link
Member Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 15, 2022

Build succeeded:

@iohk-bors iohk-bors bot merged commit d59b05e into master Nov 15, 2022
@iohk-bors iohk-bors bot deleted the jonathanknowles/withdrawal-not-beneficial branch November 15, 2022 08:45
WilliamKingNoel-Bot pushed a commit that referenced this pull request Nov 15, 2022
…`. r=jonathanknowles a=jonathanknowles ## Issue Number None. Noticed while reviewing #3555.
 
 ## Description
 
 This PR renames `ErrWithdrawalNotWorth` to `ErrWithdrawalNotBeneficial`.
 
 The wording of the former error name is broken. We _can_ say "a withdrawal is not worth **it**", but saying something is "not worth" (without the "it") just doesn't make sense in English.
 
 ## Compatibility
 
 Usages of the JSON error code `withdrawal_not_worth` are very rare: [Usages of `withdrawal_not_worth`](https://github.com/search?q=org%3Ainput-output-hk+%22withdrawal_not_worth%22&type=code).
 
 These rare cases can easily be updated with a tiny PR or two. Co-authored-by: Jonathan Knowles <[email protected]> Source commit: d59b05e
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