Skip to content
Snippets Groups Projects
Unverified Commit 0d660a42 authored by Alexandru Gheorghe's avatar Alexandru Gheorghe Committed by GitHub
Browse files

approval-voting: Make importing of duplicate assignment idempotent (#6971)


Normally, approval-voting wouldn't receive duplicate assignments because
approval-distribution makes sure of it, however in the situation where
we restart we might receive the same assignment again and since
approval-voting already persisted it we will end up inserting it twice
in `ApprovalEntry.tranches.assignments` because that's an array.

Fix this by making sure duplicate assignments are a noop if the
validator already had an assignment imported at the same tranche.

---------

Signed-off-by: default avatarAlexandru Gheorghe <alexandru.gheorghe@parity.io>
Co-authored-by: default avatarordian <write@reusable.software>
parent d5539aa6
No related merge requests found
Pipeline #511800 waiting for manual action with stages
in 24 minutes and 29 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment