Skip to content

Commit

Permalink
fix(cardano-services): drep_inactivity renamed to drep_activity
Browse files Browse the repository at this point in the history
That is the db-sync field name.
CDDL calls it "inactive".
  • Loading branch information
mirceahasegan committed Apr 16, 2024
1 parent 64f1b8a commit a3bee47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -67,15 +67,16 @@ export const toProtocolParams = ({
gov_action_lifetime,
gov_action_deposit,
drep_deposit,
drep_inactivity_period,
drep_activity,
min_fee_ref_script_cost_per_byte
}: ProtocolParamsModel): Cardano.ProtocolParameters => ({
coinsPerUtxoByte: Number(coins_per_utxo_size),
collateralPercentage: collateral_percent,
committeeTermLimit: Cardano.EpochNo(committee_max_term_length),
costModels: mapCostModels(costs),
dRepDeposit: Number(drep_deposit),
dRepInactivityPeriod: Cardano.EpochNo(drep_inactivity_period),
// CDDL represents it as `32: epoch ; DRep inactivity period`
dRepInactivityPeriod: Cardano.EpochNo(drep_activity),
dRepVotingThresholds: drep_voting_thresholds,
decentralizationParameter: String(decentralisation),
desiredNumberOfPools: optimal_pool_count,
Expand Down
Expand Up @@ -58,6 +58,7 @@ export const findProtocolParams = `
committee_min_size,
committee_max_term_length,
gov_action_lifetime,
drep_activity,
FROM epoch_param
LEFT JOIN cost_model
ON cost_model.id = epoch_param.cost_model_id
Expand Down
Expand Up @@ -62,5 +62,5 @@ export interface ProtocolParamsModel {
gov_action_lifetime: number;
gov_action_deposit: number;
drep_deposit: number;
drep_inactivity_period: number;
drep_activity: number;
}

0 comments on commit a3bee47

Please sign in to comment.