p2p: Unify Send and Receive protocol versions
Summary:
CNode has two members to keep protocol version: nRecvVersion for received messages nSendVersion for messages to send After exchanging with VERSION and VERACK messages via protocol version INIT_PROTO_VERSION, both nodes set nRecvVersion and nSendVersion to the same value which is the greatest common protocol version. This PR: replaces two CNode members, nRecvVersion nSendVersion, with m_greatest_common_version removes duplicated getter and setter There is no change in behavior on the P2P network.
Backport of core PR17785.
Depends on D9193.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9195