[avalanche] Make sure AlreadyHaveProof always returns true for the local proof
Summary:
It's possible to restart a node with a valid local proof and have that node
receive its own proof from another source before it attempts to register it
which creates two ProofRefs that are not equal (different pointers) but have
the same proofid. This leads to unexpected behaviors.
This patch does not fix the bigger root cause issue, which is mixed
responsibilities between the processor and peer manager. That will require
broader consideration and significantly more development time to do properly.
In the mean time, we can fix the behavior.
Depends on D11857
Test Plan:
ninja check check-functional
Test changes fail without the node changes:
git checkout HEAD~ net_processing.cpp rpc/avalanche.cpp ninja bitcoind bitcoin-cli test/functional/test_runner.py abc_rpc_getavalancheinfo
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11859