mirror of
https://github.com/conduition/dlctix.git
synced 2026-01-30 05:05:06 +01:00
check for unregistered players
This commit is contained in:
@@ -120,11 +120,16 @@ impl ContractParameters {
|
||||
return Err(Error);
|
||||
}
|
||||
|
||||
// Check for zero payout weights.
|
||||
for &weight in payout_map.values() {
|
||||
for (player, &weight) in payout_map.iter() {
|
||||
// Check for zero payout weights.
|
||||
if weight == 0 {
|
||||
return Err(Error);
|
||||
}
|
||||
|
||||
// Check for unregistered players.
|
||||
if !self.players.contains(player) {
|
||||
return Err(Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user