Skip to content

Commit

Permalink
p2p-governor: Improve the mock env pick script interpretation
Browse files Browse the repository at this point in the history
Previously we said that if the governor gives the environment a set to
pick from and a number it'd like us to pick, that if the number it'd
like us to pick was as big as the set then we'd automatically pick the
whole set.

This might be a sensible policy, but we're not trying to test sensible
policies here. We're trying to test the governor does the right thing in
all circumstances. It is legitimate to pick fewer than requested. So we
remove this special case and just use the general case of the usual
script interpretation.
  • Loading branch information
dcoutts authored and coot committed Sep 28, 2021
1 parent 0dc8f0c commit 90095e0
Showing 1 changed file with 0 additions and 3 deletions.
Expand Up @@ -176,9 +176,6 @@ interpretPickScript scriptVar available pickNum
| pickNum <= 0
= error "interpretPickScript: given invalid pickNum"

| Set.size available <= pickNum
= return available

| otherwise
= do pickmembers <- stepScriptSTM scriptVar
return (interpretPickMembers pickmembers available pickNum)
Expand Down

0 comments on commit 90095e0

Please sign in to comment.