Parcourir la source

Fix bug getting council info

Ricardo Maltez il y a 4 ans
Parent
commit
85ce23bb1f

+ 1 - 1
council/report-generator/report-template.md

@@ -35,7 +35,7 @@ This is a report which explains the current state of the Joystream network in nu
 * Total number of proposals: {newProposals}
 * Total number of Approved proposals: {newApprovedProposals}
 
-* ### 3.1 Elections
+### 3.1 Elections
 | Property                    | Start Block  |
 |-----------------------------|--------------|
 | Total Applicants            |{electionApplicants}              |

+ 2 - 2
council/report-generator/src/StatisticsCollector.ts

@@ -459,8 +459,8 @@ export class StatisticsCollector {
     }
 
     async fillCouncilInfo(startHash: Hash, endHash: Hash) {
-        this.statistics.councilRound = (await this.api.query.councilElection.round.at(endHash) as u32).toNumber();
-        this.statistics.councilMembers = (await this.api.query.councilElection.councilSize.at(endHash) as u32).toNumber();
+        this.statistics.councilRound = (await this.api.query.councilElection.round.at(startHash) as u32).toNumber();
+        this.statistics.councilMembers = (await this.api.query.councilElection.councilSize.at(startHash) as u32).toNumber();
         let startNrProposals = await this.api.query.proposalsEngine.proposalCount.at(startHash) as u32;
         let endNrProposals = await this.api.query.proposalsEngine.proposalCount.at(endHash) as u32;
         this.statistics.newProposals = endNrProposals.toNumber() - startNrProposals.toNumber();