Why electorate didn't change in changeTwoParams
test?
#5962
-
Hi, I'm diving into case 'changeTwoParams': {
const voters1 = createVoters(firstElectorateCreatorFacet, voterCreator);
const secondElectorateTerms = {
committeeName: 'ThirtyCommittee',
committeeSize: 5,
};
const { electorateCreatorFacet: secondElectorateCreatorFacet } =
await startElectorate(zoe, installations, secondElectorateTerms);
const newPoserInvitationP = E(
secondElectorateCreatorFacet,
).getPoserInvitation();
const [newPoserInvitation] = await Promise.all([newPoserInvitationP]);
const changes = {
[MALLEABLE_NUMBER]: 42n,
[CONTRACT_ELECTORATE]: newPoserInvitation,
};
const { details: details1, outcomeOfUpdate: electorateOutcome } =
await setupParameterChanges(
zoe,
log,
governor,
installations,
newPoserInvitation,
changes,
);
await votersVote(details1, voters1, [1, 0, 0, 0, 1]);
await E(timer).tick();
await E(timer).tick();
E.when(
electorateOutcome,
o => log(`successful outcome: ${q(o)} `),
e => log(`vote (unexpected) rejected outcome: ${e}`),
);
await validateElectorateChange(
zoe,
log,
voters1,
details1,
governorInstance,
// The electorate didn't change
firstElectorateInstance,
E(zoe).getPublicFacet(governorInstance),
);
break; |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@Chris-Hibbert is it clear to you off-hand what's going on here? |
Beta Was this translation helpful? Give feedback.
-
Ooh, good catch! That's a blatant bug in the test. There was a missing // The electorate didn't change
firstElectorateInstance, with The fix is in #5983. |
Beta Was this translation helpful? Give feedback.
Ooh, good catch! That's a blatant bug in the test.
There was a missing
await electorateOutcome
, which allowed me to replacewith
secondElectorateInstance
, which I initialized as on line 328.The fix is in #5983.