Skip to content

Commit

Permalink
Retrieve correct spend unhook.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrm50 committed Apr 19, 2024
1 parent ecebf07 commit d469894
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ func (c *SpendDAG[SpenderID, ResourceID, VoteRank]) evictSpender(spenderID Spend
for _, evictedSpenderID := range evictedSpenderIDs {
c.spendersByID.Delete(evictedSpenderID)
// unhook the spend events and remove the unhook method from the storage
unhookFunc, unhookExists := c.spendUnhooks.Get(spenderID)
unhookFunc, unhookExists := c.spendUnhooks.Get(evictedSpenderID)
if unhookExists {
unhookFunc()
c.spendUnhooks.Delete(evictedSpenderID)
Expand Down

0 comments on commit d469894

Please sign in to comment.