Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright (c) 2012 The Bitcoin developers
  2. // Distributed under the MIT/X11 software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef BITCOIN_VERSION_H
  5. #define BITCOIN_VERSION_H
  6. #include "clientversion.h"
  7. #include <string>
  8. #include <vector>
  9. //
  10. // client versioning
  11. //
  12. static const int CLIENT_VERSION =
  13. 1000000 * CLIENT_VERSION_MAJOR
  14. + 10000 * CLIENT_VERSION_MINOR
  15. + 100 * CLIENT_VERSION_REVISION
  16. + 1 * CLIENT_VERSION_BUILD;
  17. extern const std::string CLIENT_NAME;
  18. extern const std::string CLIENT_BUILD;
  19. extern const std::string CLIENT_DATE;
  20. //
  21. // network protocol versioning
  22. //
  23. static const int PROTOCOL_VERSION = 70002;
  24. // initial proto version, to be increased after version/verack negotiation
  25. static const int INIT_PROTO_VERSION = 209;
  26. // In this version, 'getheaders' was introduced.
  27. static const int GETHEADERS_VERSION = 31800;
  28. // disconnect from peers older than this proto version
  29. static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
  30. // nTime field added to CAddress, starting with this version;
  31. // if possible, avoid requesting addresses nodes older than this
  32. static const int CADDR_TIME_VERSION = 31402;
  33. // only request blocks from nodes outside this range of versions
  34. static const int NOBLKS_VERSION_START = 32000;
  35. static const int NOBLKS_VERSION_END = 32400;
  36. // BIP 0031, pong message, is enabled for all versions AFTER this one
  37. static const int BIP0031_VERSION = 60000;
  38. // "mempool" command, enhanced "getdata" behavior starts with this version
  39. static const int MEMPOOL_GD_VERSION = 60002;
  40. std::string FormatFullVersion();
  41. std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
  42. #endif // BITCOIN_VERSION_H