Skip to content

Commit

Permalink
clean goodWorkersNumber variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Nov 20, 2024
1 parent 5c6045a commit cfc7034
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/000_fullchain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ describe('Integration tests', function () {
});
}
for (let workerNumber = 4; workerNumber < 6; workerNumber++) {
let goodWorkersNumber = workerNumber - 1;
// Worker1 will contribute badly
it(`[7.${workerNumber - 3}] No sponsorship, no beneficiary, no callback, no BoT, up to ${workerNumber} workers with 1 bad actor`, async function () {
const volume = 1;
Expand Down Expand Up @@ -333,7 +332,7 @@ describe('Integration tests', function () {
tag: standardDealTag,
beneficiary: beneficiary.address,
volume,
trust: goodWorkersNumber,
trust: winningWorkers.length,
});

const { dealId, dealPrice, schedulerStakePerDeal } =
Expand Down Expand Up @@ -401,15 +400,15 @@ describe('Integration tests', function () {
expect(finalizeTx).to.changeTokenBalances(
iexecPoco,
[winningWorker.address],
[workerStake + workerRewardPerTask / goodWorkersNumber],
[workerStake + workerRewardPerTask / winningWorkers.length],
);
expect(await iexecPoco.viewScore(winningWorker.address)).to.be.equal(1);
}
// verify task status
expect((await iexecPoco.viewTask(taskId)).status).to.equal(
TaskStatusEnum.COMPLETED,
);
// checks n frozen balance changes
// checks on frozen balance changes
const expectedFrozenChanges = [0, -taskPrice, -schedulerStakePerTask, 0, 0];
for (let i = 0; i < workerNumber; i++) {
expectedFrozenChanges.push(0);
Expand Down

0 comments on commit cfc7034

Please sign in to comment.