[avalanche] Remove unnecessary peer lookup after modifying the peer set
Summary:
The PeerManager::removeNodeFromPeer() methods calls modify() on the
peer set, and an additional lookup is performed to make sure the
iterator did not get invalidated during the operation. However according
to the documentation:
Validity of position is preserved if the operation succeeds
where position is the iterator:
https://www.boost.org/doc/libs/1_51_0/libs/multi_index/doc/reference/hash_indices.html#modify
Since the return value of the modify call is checked, the iterator is
guaranteed to remain valid. Furthermore, no key is modified which gives
an additional guarantee.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D9699