diff --git a/forum-network/src/classes/dao/validation-pool.js b/forum-network/src/classes/dao/validation-pool.js index c46f213..8300f54 100644 --- a/forum-network/src/classes/dao/validation-pool.js +++ b/forum-network/src/classes/dao/validation-pool.js @@ -113,6 +113,11 @@ export class ValidationPool extends ReputationHolder { throw new Error(`Each citation magnitude must not exceed revaluation limit ${params.revaluationLimit}`); } + const totalAuthorWeight = (post.authors ?? []).reduce((total, { weight }) => total += weight, 0); + if (totalAuthorWeight !== 1) { + throw new Error(`Total author weight ${totalAuthorWeight} !== 1`); + } + this.state = ValidationPoolStates.OPEN; this.setStatus('Open'); this.stakes = new Set();