diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-10-12 22:57:37 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-12-04 11:19:15 +0100 |
commit | fa0f4157098ea68169ced44730986d0ed2c3a5aa (patch) | |
tree | 91a520e33681c8809c360c9f44429d88dd7670dd /src/net.h | |
parent | dca80ffb45fcc8e6eedb6dc481d500dedab4248b (diff) | |
download | bitcoin-fa0f4157098ea68169ced44730986d0ed2c3a5aa.tar.xz |
net: Assume that SetCommonVersion is called at most once per peer
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -24,14 +24,15 @@ #include <sync.h> #include <threadinterrupt.h> #include <uint256.h> +#include <util/check.h> #include <atomic> +#include <condition_variable> #include <cstdint> #include <deque> #include <map> -#include <thread> #include <memory> -#include <condition_variable> +#include <thread> class CScheduler; class CNode; @@ -1131,6 +1132,7 @@ public: void SetCommonVersion(int greatest_common_version) { + Assume(m_greatest_common_version == INIT_PROTO_VERSION); m_greatest_common_version = greatest_common_version; } int GetCommonVersion() const |