more logging
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 36s Details

This commit is contained in:
Ladd Hoffman 2024-05-04 19:30:49 -05:00
parent 75919de640
commit 0617fea89e
1 changed files with 2 additions and 0 deletions

View File

@ -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)