More commentary
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled Details

This commit is contained in:
Ladd Hoffman 2024-04-15 15:40:19 -05:00
parent c02e893cfc
commit 7d294529c8
1 changed files with 5 additions and 1 deletions

View File

@ -155,10 +155,14 @@ contract Forum is Reputation {
if (balanceOf(post.author) < post.reputation) {
// If author has already lost reputation that was gained from this post,
// that means other DAO members gained it through policing.
// Here we preserve the sum of members REP but decrease the sum of posts REP.
// We have to increase the magnitude of the amount we're "refunding", which is expressed as a negative number.
// This has the effect of preserving the sum of all members' REP.
// However, we still set the post reputation all the way to zero.
// So we end up decreasing the sum of all posts' REP.
refundToInbound -= int(
post.reputation - balanceOf(post.author)
);
console.logInt(refundToInbound);
_update(post.author, address(this), balanceOf(post.author));
} else {
_update(post.author, address(this), post.reputation);