Prior to this commit, the peer was connected, and then the services and
connectivity fields in the CNode object were manually set. Instead, send
p2p version and verack messages, and have net_processing's internal
logic set the state of the node.
This ensures that the node's internal state is consistent with how it
would be set in the live code.
Prior to this commit, dummyNode1.nServices was set to NODE_NONE
which was not a problem since CNode::fClient and
CNode::m_limited_node are default initialised to false. Now that we
are doing the actual version handshake, the values of fClient and
m_limited_node are set during the handshake and cause the test to fail
if we do not set dummyNode1.nServices to a reasonable value
(NODE_NETWORK).
This is a partial backport of core#25514 and core#25591
https://github.com/bitcoin/bitcoin/pull/25591/commits/fa7098947ceff1964812d430e769af6d1ad561bd (for Handshake)
https://github.com/bitcoin/bitcoin/pull/25514/commits/fc5eb528f7d7b33e2f2e443c5610a1551c7f099b
Depends on D14745