[avalanche] Don't require the proof when adding an avalanche node
Summary:
An avalanche node is bound to an avalanche peer, which itself requires a
proof. So far the PeerManager::addNode() was fetching the peer from
the supplied proof, creating it as neeeded. This is an inconvenient API
when we need to add a node while the proof is not yet known (and the
peer doesn't exist yet).
This diff updates the method so that it does not require a proof
anymore. The proof is looked up from the node's delegation, and adding
the node fails if there is no peer with that proof. This will allow for
adding nodes pending for a peer that would need to be bound together at
a later time. Another consequence is that it removes the case of the
proof not matching the delegation.
It would have been possible to keep the current API and add the proof
first if supplied, but since there is a single callsite (outside of
tests) it is easier to just update it.
Depends on D9698.
Ref T1634.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Maniphest Tasks: T1634
Differential Revision: https://reviews.bitcoinabc.org/D9700