Skip to content

Commit ef255ff

Browse files
committed
Fix a bug in queryPoolState
This bug manifested itself in current pool parameters being returned instead of the future ones.
1 parent 951a280 commit ef255ff

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libs/cardano-ledger-api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
* Remove the `State.Query` module and `getFilteredDelegationsAndRewardAccounts` function.
2020

21+
## 1.12.1.0
22+
23+
* Fix a bug in `queryPoolState`, where current Pool parameters where returned instead of the future ones.
24+
2125
## 1.12.0.0
2226

2327
* Add `upgradeNativeScript` method to `EraApi`

libs/cardano-ledger-api/src/Cardano/Ledger/Api/State/Query.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,8 @@ mkQueryPoolStateResult ::
469469
mkQueryPoolStateResult f ps =
470470
QueryPoolStateResult
471471
{ qpsrStakePoolParams = Map.mapWithKey stakePoolStateToStakePoolParams restrictedStakePools
472-
, qpsrFutureStakePoolParams = Map.mapWithKey stakePoolStateToStakePoolParams restrictedStakePools
472+
, qpsrFutureStakePoolParams =
473+
Map.mapWithKey stakePoolStateToStakePoolParams (f $ psFutureStakePools ps)
473474
, qpsrRetiring = f $ psRetiring ps
474475
, qpsrDeposits = Map.map (fromCompact . spsDeposit) restrictedStakePools
475476
}

0 commit comments

Comments
 (0)