In mintAccrued; withdrawn[human] += newSupply; instead of withdrawn[human] = newSupply;
In reportRemoval; withdrawn[human] = 0; instead of withdrawn[msg.sender] = newSupply;
Reason: We don't want to set msg.senders withdrawn amount to the amount msg.sender earned by repoting a human.
Also edited a test case to fail for the bug in the first fix.
Two fixes:
In
mintAccrued
;withdrawn[human] += newSupply;
instead ofwithdrawn[human] = newSupply;
In
reportRemoval
;withdrawn[human] = 0;
instead ofwithdrawn[msg.sender] = newSupply;
Reason: We don't want to setmsg.sender
s withdrawn amount to the amount msg.sender earned by repoting a human.Also edited a test case to fail for the bug in the first fix.
@santisiri