Limit reference chain depth to 1 for negative citations

This commit is contained in:
Ladd Hoffman 2023-01-27 21:27:32 -06:00
parent 4c9cee9963
commit d04b280645
1 changed files with 5 additions and 1 deletions

View File

@ -113,7 +113,11 @@ export class Forum extends ReputationHolder {
async propagateValue(rewardsAccumulator, fromActor, post, increment, depth = 0) { async propagateValue(rewardsAccumulator, fromActor, post, increment, depth = 0) {
if (params.referenceChainLimit >= 0 && depth > params.referenceChainLimit) { if (params.referenceChainLimit >= 0 && depth > params.referenceChainLimit) {
return []; return increment;
}
if (increment < 0 && depth > 1) {
return increment;
} }
this.actions.propagateValue.log(fromActor, post, `(${increment})`); this.actions.propagateValue.log(fromActor, post, `(${increment})`);