diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-06-29 17:24:53 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-06-29 17:24:53 -0400 |
commit | 1006f0707e34f8903f247195dabd86243ae61f05 (patch) | |
tree | cc1539a2e0d8fe72e3545c617d0bc1a9e34c0330 /src/net.cpp | |
parent | 70ab73a0087cbb0d6b26c9ad58146ae542b1b9be (diff) |
RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode data
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index f1073e0a3e..2a09d20dea 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -606,7 +606,23 @@ bool CNode::Misbehaving(int howmuch) return false; } - +#undef X +#define X(name) stats.name = name +void CNode::copyStats(CNodeStats &stats) +{ + X(nServices); + X(nLastSend); + X(nLastRecv); + X(nTimeConnected); + X(addrName); + X(nVersion); + X(strSubVer); + X(fInbound); + X(nReleaseTime); + X(nStartingHeight); + X(nMisbehavior); +} +#undef X |