File tree Expand file tree Collapse file tree 3 files changed +12
-21
lines changed
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger Expand file tree Collapse file tree 3 files changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ allow-newer:
59
59
source-repository-package
60
60
type : git
61
61
location : https://github.com/IntersectMBO/cardano-ledger
62
- tag : 640fb66d27ac202764de0dda76621c6d57852ba9
63
- --sha256 : sha256-2vOUUvY19Emx5UpHNHZnIaWoqI5g3kPgjFQJGm9mVmk =
62
+ tag : f6f9e8927cbf3c9d604ca35814d533a0378034dc
63
+ --sha256 : sha256-LMFLIGXus4NyOcJnZ60rwNgwDLdeXdblVUkjGbpn74c =
64
64
subdir :
65
65
eras/allegra/impl
66
66
eras/alonzo/impl
Original file line number Diff line number Diff line change 7
7
8
8
module Ouroboros.Consensus.Shelley.Ledger.PeerSelection () where
9
9
10
+ import qualified Cardano.Ledger.Api.State.Query as SL
10
11
import Cardano.Ledger.BaseTypes
11
12
import qualified Cardano.Ledger.Keys as SL
12
13
import qualified Cardano.Ledger.Shelley.API as SL
@@ -52,12 +53,13 @@ instance SL.EraCertState era => LedgerSupportsPeerSelection (ShelleyBlock proto
52
53
(futurePoolParams, poolParams) =
53
54
(SL. psFutureStakePoolParams pstate, SL. psStakePoolParams pstate)
54
55
where
55
- pstate :: SL. PState era
56
+ pstate :: SL. PState'
56
57
pstate =
57
- view SL. certPStateL
58
- . SL. lsCertState
59
- . SL. esLState
60
- . SL. nesEs
58
+ SL. mkPState' id
59
+ $ view SL. certPStateL
60
+ . SL. lsCertState
61
+ . SL. esLState
62
+ . SL. nesEs
61
63
$ shelleyLedgerState
62
64
63
65
relayToLedgerRelayAccessPoint :: SL. StakePoolRelay -> Maybe LedgerRelayAccessPoint
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ data instance BlockQuery (ShelleyBlock proto era) fp result where
243
243
BlockQuery
244
244
(ShelleyBlock proto era )
245
245
QFNoTables
246
- ( SL. PState era )
246
+ SL. PState'
247
247
GetStakeSnapshots ::
248
248
Maybe (Set (SL. KeyHash 'SL.StakePool )) ->
249
249
BlockQuery
@@ -425,22 +425,11 @@ instance
425
425
GetStakePools ->
426
426
SL. getPools st
427
427
GetStakePoolParams poolids ->
428
- SL. getPoolParameters st poolids
428
+ SL. psStakePoolParams $ SL. queryPoolState st $ Just poolids
429
429
GetRewardInfoPools ->
430
430
SL. getRewardInfoPools globals st
431
431
GetPoolState mPoolIds ->
432
- let certPState = view SL. certPStateL . SL. lsCertState . SL. esLState . SL. nesEs $ st
433
- in case mPoolIds of
434
- Just poolIds ->
435
- SL. PState
436
- { SL. psStakePoolParams =
437
- Map. restrictKeys (SL. psStakePoolParams certPState) poolIds
438
- , SL. psFutureStakePoolParams =
439
- Map. restrictKeys (SL. psFutureStakePoolParams certPState) poolIds
440
- , SL. psRetiring = Map. restrictKeys (SL. psRetiring certPState) poolIds
441
- , SL. psDeposits = Map. restrictKeys (SL. psDeposits certPState) poolIds
442
- }
443
- Nothing -> certPState
432
+ SL. queryPoolState st mPoolIds
444
433
GetStakeSnapshots mPoolIds ->
445
434
let SL. SnapShots
446
435
{ SL. ssStakeMark
You can’t perform that action at this time.
0 commit comments