Add initial self-delegation check in token handler#655
Add initial self-delegation check in token handler#655fewensa merged 1 commit intoringecosystem:mainfrom
Conversation
Signed-off-by: Sigri <sigri44@hotmail.fr>
|
Please take a review and ensure it not breaks our existing voting power calculation logic. @fewensa |
|
What this fixes This PR fixes a vote-power double-materialization bug in the indexer triggered by a specific event combination: an initial self-delegation and an incoming transfer occurring in the same transaction. The exact scenario:
Under this condition, the old logic on How it is fixed The change is in This PR makes it return
With this in place, Relationship to #639 This is a narrow follow-up hardening patch after #639. Both target the same general bug family (same-transaction Recommendation The logic change is directionally correct. However the PR is missing a targeted regression test. A focused test case should be added to Regression testing needs to be added. |
Fix self-delegate calculation for our community