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

Extend PoolCurrentPaydayInfo and PoolInfoResponse. #335

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading