diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-06 11:50:56 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-06 11:50:56 -0400 |
| commit | 5f8a3f4a7f2eaae3e3091bc4e0dc8977ec597744 (patch) | |
| tree | f5e4b0eb370537c8a075249fb6d3940a895faaf8 /node/Peer.hpp | |
| parent | 499ac2699f5e93e691792790121ed1b4d35da210 (diff) | |
| download | infinitytier-5f8a3f4a7f2eaae3e3091bc4e0dc8977ec597744.tar.gz infinitytier-5f8a3f4a7f2eaae3e3091bc4e0dc8977ec597744.zip | |
More detail and output improvements to command bus "listpeers," and a little cleanup.
Diffstat (limited to 'node/Peer.hpp')
| -rw-r--r-- | node/Peer.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp index 4cc5e0f3..339b9e1a 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -348,6 +348,19 @@ public: } /** + * @return Remote version in string form or '?' if unknown + */ + inline std::string remoteVersion() const + { + if ((_vMajor)||(_vMinor)||(_vRevision)) { + char tmp[32]; + sprintf(tmp,"%u.%u.%u",_vMajor,_vMinor,_vRevision); + return std::string(tmp); + } + return std::string("?"); + } + + /** * Get and reset dirty flag * * @return Previous value of dirty flag before reset |
