[avalanche] Make sure to only promote contenders once for each proofid
Summary:
Looping over the contenders container while inserting causes the loop to go over the newly inserted items which is not intended. For better or worse, double inserting a contender has no change in behavior, so this diff does not either.
Depends on D17860
Test Plan:
./test/functional/test_runner.py --nocleanup abc_p2p_avalanche_contender_voting
Verify in the log that when contenders are promoted, "new id <contenderid>" never appears duplicated.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17861