From d4698947d75073878abc3bab72ef7fb6678eb52b Mon Sep 17 00:00:00 2001 From: Piotr Macek <4007944+piotrm50@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:13:40 +0200 Subject: [PATCH] Retrieve correct spend unhook. --- pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go index 2426c7b77..a6da3659b 100644 --- a/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go +++ b/pkg/protocol/engine/mempool/spenddag/spenddagv1/spenddag.go @@ -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)