Skip to content

Commit 525a3fc

Browse files
committed
Add optional default vote to PoolParams
1 parent 1d87e5a commit 525a3fc

File tree

17 files changed

+27
-3
lines changed

17 files changed

+27
-3
lines changed

eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/Examples.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ examplePoolParams =
404404
{ pmUrl = fromJust $ textToUrl 64 "consensus.pool"
405405
, pmHash = "{}"
406406
}
407+
, ppDefaultVote = SNothing
407408
}
408409

409410
examplePayKey :: KeyPair 'Payment

eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,7 @@ freshPoolParams khPool rewardAccount = do
16791679
let minCost = pp ^. ppMinPoolCostL
16801680
poolCostExtra <- uniformRM (Coin 0, Coin 100_000_000)
16811681
pledge <- uniformRM (Coin 0, Coin 100_000_000)
1682+
defaultVote <- arbitrary
16821683
pure
16831684
PoolParams
16841685
{ ppVrf = vrfHash
@@ -1690,6 +1691,7 @@ freshPoolParams khPool rewardAccount = do
16901691
, ppMargin = def
16911692
, ppId = khPool
16921693
, ppCost = minCost <> poolCostExtra
1694+
, ppDefaultVote = defaultVote
16931695
}
16941696

16951697
registerPool ::

eras/shelley/test-suite/bench/Cardano/Ledger/Shelley/Bench/Rewards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ genChainInEpoch epoch = do
149149
, ppOwners = Set.singleton owner
150150
, ppRelays = StrictSeq.empty
151151
, ppMetadata = SNothing
152+
, ppDefaultVote = SNothing
152153
}
153154
]
154155
, sgsStake =

eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/BenchmarkFunctions.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ mkPoolParameters keys =
362362
, ppOwners = Set.singleton $ hashKey (vKey stakeKeyOne)
363363
, ppRelays = StrictSeq.empty
364364
, ppMetadata = SNothing
365+
, ppDefaultVote = SNothing
365366
}
366367

367368
-- Create stake pool registration certs

eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Cast.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ alicePoolParams =
137137
{ pmUrl = fromJust $ textToUrl 64 "alice.pool"
138138
, pmHash = BS.pack "{}"
139139
}
140+
, ppDefaultVote = SNothing
140141
}
141142

142143
-- | Alice's VRF key hash
@@ -187,6 +188,7 @@ bobPoolParams =
187188
, ppOwners = Set.singleton $ hashKey (vKey bobStake)
188189
, ppRelays = StrictSeq.empty
189190
, ppMetadata = SNothing
191+
, ppDefaultVote = SNothing
190192
}
191193

192194
-- | Bob's VRF key hash

eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/TxCert.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ genStakePool poolKeys skeys (Coin minPoolCost) =
389389
Set.empty
390390
StrictSeq.empty
391391
SNothing
392+
SNothing
392393
in (pps, aikCold allPoolKeys)
393394

394395
-- | Generate `RegPool` and the key witness.

eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rewards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ genPoolInfo PoolSetUpArgs {poolPledge, poolCost, poolMargin, poolMembers} = do
276276
, ppOwners = Set.fromList [hashKey $ vKey ownerKey]
277277
, ppRelays = StrictSeq.empty
278278
, ppMetadata = SNothing
279+
, ppDefaultVote = SNothing
279280
}
280281
pure $ PoolInfo {params, coldKey, ownerKey, ownerStake, rewardKey, members}
281282

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Fees.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ alicePoolParams =
126126
{ pmUrl = fromJust $ textToUrl 64 "alice.pool"
127127
, pmHash = BS.pack "{}"
128128
}
129+
, ppDefaultVote = SNothing
129130
}
130131

131132
aliceAddr :: Addr

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Serialisation/Golden/Encoding.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ tests =
536536
{ pmUrl = Maybe.fromJust $ textToUrl 64 poolUrl
537537
, pmHash = poolMDHash
538538
}
539+
, ppDefaultVote = SNothing
539540
}
540541
)
541542
)

eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Serialisation/Golden/Genesis.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ exampleShelleyGenesis =
265265
{ L.pmUrl = fromJust $ textToUrl 64 "best.pool.com"
266266
, L.pmHash = BS.pack "100ab{}100ab{}"
267267
}
268+
, L.ppDefaultVote = L.SNothing
268269
}
269270
staking =
270271
ShelleyGenesisStaking

0 commit comments

Comments
 (0)