Clarify sequence for value propagation

This commit is contained in:
Ladd Hoffman 2023-01-27 18:07:45 -06:00
parent db8a8ca346
commit acda73fff4
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ export class Forum extends ReputationHolder {
} }
async onValidate({ async onValidate({
bench, pool, postId, tokenId, bench, postId, tokenId,
}) { }) {
this.activate(); this.activate();
const initialValue = bench.reputation.valueOf(tokenId); const initialValue = bench.reputation.valueOf(tokenId);
@ -96,7 +96,7 @@ export class Forum extends ReputationHolder {
// Compute rewards // Compute rewards
const rewardsAccumulator = new Map(); const rewardsAccumulator = new Map();
await this.propagateValue(rewardsAccumulator, pool, post, initialValue); await this.propagateValue(rewardsAccumulator, this, post, initialValue);
// Apply computed rewards to update values of tokens // Apply computed rewards to update values of tokens
for (const [id, value] of rewardsAccumulator) { for (const [id, value] of rewardsAccumulator) {