From 0617fea89e50a2fa0bf7c1ac0d9297c48bd1d7bf Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Sat, 4 May 2024 19:30:49 -0500 Subject: [PATCH] more logging --- backend/src/event-handlers/rollup/compute-author-weights.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/event-handlers/rollup/compute-author-weights.js b/backend/src/event-handlers/rollup/compute-author-weights.js index 54bcff8..1997f8d 100644 --- a/backend/src/event-handlers/rollup/compute-author-weights.js +++ b/backend/src/event-handlers/rollup/compute-author-weights.js @@ -9,6 +9,7 @@ const computeAuthorWeights = async (batchItems_) => { const post = await read(postId); const matrixPool = await matrixPools.get(postId); console.log('batch item', { postId, post, matrixPool }); + console.log('post.authors', post.authors); const { fee, result: { votePasses, quorumMet } } = matrixPool; post.authors.forEach(({ authorAddress, weightPPM }) => { weights[authorAddress] = weights[authorAddress] ?? 0; @@ -20,6 +21,7 @@ const computeAuthorWeights = async (batchItems_) => { // TODO: Propagation via references }); }); + console.log('weights', weights); // Rescale author weights so they sum to 1000000 const sumOfWeights = Object.values(weights).reduce((t, v) => t + v, 0); const scaledWeights = Object.values(weights)