Skip to content

Commit

Permalink
Merge pull request #335 from Concordium/pool_info_reponse
Browse files Browse the repository at this point in the history
Extend PoolCurrentPaydayInfo and PoolInfoResponse.
  • Loading branch information
td202 authored Jan 9, 2025
2 parents d0cc2bc + bc52fa1 commit b54bdd7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Note: due to API changes, this release may not work correctly with node versions
accounts with scheduled releases, cooldowns, pre-cooldowns and pre-pre-cooldowns.
- Raw commands `GetBlockTransactionEvents` and `GetTransactionStatus` include the `parameter`
for `ContractInitialized` events.
- From protocol version 8, raw command `GetPoolStatus` indicates if a validator is suspended and,
if it is in the current committee, if it is primed for suspension and the current count of
missed rounds.

## 7.0.1

Expand Down
3 changes: 3 additions & 0 deletions src/Concordium/Client/GRPC2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,8 @@ instance FromProto Proto.PoolCurrentPaydayInfo where
bpsBakerEquityCapital <- fromProto $ cpi ^. ProtoFields.bakerEquityCapital
bpsDelegatedCapital <- fromProto $ cpi ^. ProtoFields.delegatedCapital
bpsCommissionRates <- fromProto $ cpi ^. ProtoFields.commissionRates
let bpsIsPrimedForSuspension = cpi ^. ProtoFields.maybe'isPrimedForSuspension
let bpsMissedRounds = cpi ^. ProtoFields.maybe'missedRounds
return CurrentPaydayBakerPoolStatus{..}

instance FromProto Proto.PoolInfoResponse where
Expand All @@ -986,6 +988,7 @@ instance FromProto Proto.PoolInfoResponse where
return $ Just ActiveBakerPoolStatus{..}
psCurrentPaydayStatus <- fromProtoMaybe $ pir ^. ProtoFields.maybe'currentPaydayInfo
psAllPoolTotalCapital <- fromProto $ pir ^. ProtoFields.allPoolTotalCapital
let psIsSuspended = pir ^. ProtoFields.maybe'isSuspended
return BakerPoolStatus{..}

instance FromProto Proto.PassiveDelegationInfo where
Expand Down

0 comments on commit b54bdd7

Please sign in to comment.