aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-06-05 10:22:53 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-09-07 21:03:44 +0300
commite9a6d8b13b0558b17cdafbd32fd2663b4138ff11 (patch)
tree2b62861d483b0ed72ff207e24742b6176e860df4 /src/net.cpp
parent147d50d63e07f600b414273a9f6b84f9f4ad9696 (diff)
downloadbitcoin-e9a6d8b13b0558b17cdafbd32fd2663b4138ff11.tar.xz
p2p: Unify Send and Receive protocol versions
There is no change in behavior on the P2P network.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/net.cpp b/src/net.cpp
index e35d05cec0..84f1f9f068 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -621,32 +621,6 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete
return true;
}
-void CNode::SetSendVersion(int nVersionIn)
-{
- // Send version may only be changed in the version message, and
- // only one version message is allowed per session. We can therefore
- // treat this value as const and even atomic as long as it's only used
- // once a version message has been successfully processed. Any attempt to
- // set this twice is an error.
- if (nSendVersion != 0) {
- error("Send version already set for node: %i. Refusing to change from %i to %i", id, nSendVersion, nVersionIn);
- } else {
- nSendVersion = nVersionIn;
- }
-}
-
-int CNode::GetSendVersion() const
-{
- // The send version should always be explicitly set to
- // INIT_PROTO_VERSION rather than using this value until SetSendVersion
- // has been called.
- if (nSendVersion == 0) {
- error("Requesting unset send version for node: %i. Using %i", id, INIT_PROTO_VERSION);
- return INIT_PROTO_VERSION;
- }
- return nSendVersion;
-}
-
int V1TransportDeserializer::readHeader(const char *pch, unsigned int nBytes)
{
// copy data to temporary parsing buffer