From 5f8a3f4a7f2eaae3e3091bc4e0dc8977ec597744 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 6 Aug 2013 11:50:56 -0400 Subject: More detail and output improvements to command bus "listpeers," and a little cleanup. --- node/Peer.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'node/Peer.hpp') diff --git a/node/Peer.hpp b/node/Peer.hpp index 4cc5e0f3..339b9e1a 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -347,6 +347,19 @@ public: _vRevision = vrev; } + /** + * @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 * -- cgit v1.2.3