Skip to content

Commit ce232ed

Browse files
committed
fix: correct swapped min_pool_cost / coins_per_utxo_size
The paramProposalEncoder supplied paramProposalCoinsPerUtxoSize at the slot reserved for min_pool_cost and paramProposalMinPoolCost at the slot reserved for coins_per_utxo_size, so every row inserted into param_proposal had the two column values swapped. Swap the two lines in paramProposalEncoder so the encoder order matches the ParamProposal record definition and paramProposalDecoder. Existing rows written by affected versions remain swapped on disk and need a resync (or one-off column-swap migration) to correct.
1 parent 22a5818 commit ce232ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cardano-db/src/Cardano/Db/Schema/Core/GovernanceAndVoting.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ paramProposalEncoder =
547547
, paramProposalProtocolMajor >$< E.param (E.nullable $ fromIntegral >$< E.int2)
548548
, paramProposalProtocolMinor >$< E.param (E.nullable $ fromIntegral >$< E.int2)
549549
, paramProposalMinUtxoValue >$< maybeDbLovelaceEncoder
550-
, paramProposalCoinsPerUtxoSize >$< maybeDbLovelaceEncoder
550+
, paramProposalMinPoolCost >$< maybeDbLovelaceEncoder
551551
, paramProposalCostModelId >$< Id.maybeIdEncoder Id.getCostModelId
552552
, paramProposalPriceMem >$< E.param (E.nullable E.float8)
553553
, paramProposalPriceStep >$< E.param (E.nullable E.float8)
@@ -559,7 +559,7 @@ paramProposalEncoder =
559559
, paramProposalCollateralPercent >$< E.param (E.nullable $ fromIntegral >$< E.int2)
560560
, paramProposalMaxCollateralInputs >$< E.param (E.nullable $ fromIntegral >$< E.int2)
561561
, paramProposalRegisteredTxId >$< Id.idEncoder Id.getTxId
562-
, paramProposalMinPoolCost >$< maybeDbLovelaceEncoder
562+
, paramProposalCoinsPerUtxoSize >$< maybeDbLovelaceEncoder
563563
, paramProposalPvtMotionNoConfidence >$< E.param (E.nullable E.float8)
564564
, paramProposalPvtCommitteeNormal >$< E.param (E.nullable E.float8)
565565
, paramProposalPvtCommitteeNoConfidence >$< E.param (E.nullable E.float8)

0 commit comments

Comments
 (0)