From 667a051c1312faf526963a0eaabcfce346e65973 Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Sat, 28 Jan 2023 08:24:39 -0600 Subject: [PATCH] Fixup reference chain limit enforcement --- forum-network/src/classes/forum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum-network/src/classes/forum.js b/forum-network/src/classes/forum.js index e40a3d8..cf96b4e 100644 --- a/forum-network/src/classes/forum.js +++ b/forum-network/src/classes/forum.js @@ -116,7 +116,7 @@ export class Forum extends ReputationHolder { // Recursively distribute reputation to citations, according to weights let totalOutboundAmount = 0; - if (params.referenceChainLimit >= 0 && depth <= params.referenceChainLimit) { + if (params.referenceChainLimit === null || depth <= params.referenceChainLimit) { for (const { postId: citedPostId, weight } of post.citations) { const citedPost = this.getPost(citedPostId); let outboundAmount = weight * increment;