vpatch file split hunks

all signers:

antecedents: polarbeard_better_log_messages

press order:

patch:

- 84193F267FE20CDD9BC3A525CA206D4C00AB8B732AB386E4582E77E96E2574B08DA2916E927839C8C1247867E42C9B9124F48546626F675F1D8CEA705AC87B3A
+ 9855E2A61664F762BA151C9197678F136EF38E199ED71665315B3706DC734D72E2C010FE07EFE7BB5D33A8CFE50FA380D5CC31B86FCD1EC7B559D3F83A21AA8B
bitcoin/src/bitcoinrpc.cpp
(196 . 6)(196 . 42)
5 return (int)vNodes.size();
6 }
7
8 Value getpeerinfo(const Array& params, bool fHelp)
9 {
10 if (fHelp || params.size() != 0)
11 throw runtime_error(
12 "getpeerinfo\n"
13 "Returns data about each connected network node.");
14
15 Array ret;
16
17 CRITICAL_BLOCK(cs_vNodes)
18 {
19 BOOST_FOREACH(CNode* pnode, vNodes)
20 {
21 CNodeStats stats;
22 pnode->CopyStats(stats);
23
24 Object obj;
25 obj.push_back(Pair("addr", stats.addr.ToString()));
26 obj.push_back(Pair("services", strprintf("%08"PRI64x, stats.nServices)));
27 obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend));
28 obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv));
29 obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected));
30 obj.push_back(Pair("version", stats.nVersion));
31 obj.push_back(Pair("subver", stats.strSubVer));
32 obj.push_back(Pair("inbound", stats.fInbound));
33 obj.push_back(Pair("releasetime", (boost::int64_t)stats.nReleaseTime));
34 obj.push_back(Pair("height", stats.nStartingHeight));
35 obj.push_back(Pair("banscore", stats.nMisbehavior));
36
37 ret.push_back(obj);
38 }
39 }
40
41 return ret;
42 }
43
44
45 double GetDifficulty()
46 {
(1850 . 6)(1886 . 7)
48 make_pair("getblockcount", &getblockcount),
49 make_pair("getblocknumber", &getblocknumber),
50 make_pair("getconnectioncount", &getconnectioncount),
51 make_pair("getpeerinfo", &getpeerinfo),
52 make_pair("getdifficulty", &getdifficulty),
53 make_pair("getgenerate", &getgenerate),
54 make_pair("setgenerate", &setgenerate),
(1897 . 6)(1934 . 7)
56 "getblockcount",
57 "getblocknumber", // deprecated
58 "getconnectioncount",
59 "getpeerinfo",
60 "getdifficulty",
61 "getgenerate",
62 "setgenerate",
- F2413EBC07B49F7A4CB96E4AE82BCA531B78E4AFE6B2C93BE4E00A9C89813CFBB62B0F255DDE13EE6E59F883936AFC2640B139E49EA7A766868CDB9EDC2CD3DB
+ 0F41846E6A31C2636E9836BDD08321C25551ED38E711A667A747D967332CB40C32A757A47599F03ED5AD111405941AC898C3FD6C6A0334FE77808DFE0CC1B443
bitcoin/src/net.cpp
(577 . 16)(577 . 20)
67 return false;
68 }
69
70
71
72
73
74
75
76
77
78
79
80 void CNode::CopyStats(CNodeStats &stats)
81 {
82 stats.nServices = nServices;
83 stats.nLastSend = nLastSend;
84 stats.nLastRecv = nLastRecv;
85 stats.nTimeConnected = nTimeConnected;
86 stats.addr = addr;
87 stats.nVersion = nVersion;
88 stats.strSubVer = strSubVer;
89 stats.fInbound = fInbound;
90 stats.nReleaseTime = nReleaseTime;
91 stats.nStartingHeight = nStartingHeight;
92 stats.nMisbehavior = nMisbehavior;
93 }
94
95 void ThreadSocketHandler(void* parg)
96 {
- F72C255497921A2DBC173565EC31179D1E5959FA3D0BC61313F6D0AC168F471EE79DCE5EE92F51EE923DAF2E8B1959B8368E066FD177FFCB5C57136A211BC2F0
+ 38BE381DB84AB1B427105F665E9D0B98C8AC9841BB3847216896E007198371ED69930082466D80675CA1B80928395E3887EA48866F86BCB0D7F119B429599F75
bitcoin/src/net.h
(87 . 10)(87 . 21)
101 extern int fUseProxy;
102 extern CAddress addrProxy;
103
104
105
106
107
108 class CNodeStats
109 {
110 public:
111 uint64 nServices;
112 int64 nLastSend;
113 int64 nLastRecv;
114 int64 nTimeConnected;
115 CAddress addr;
116 int nVersion;
117 std::string strSubVer;
118 bool fInbound;
119 int64 nReleaseTime;
120 int nStartingHeight;
121 int nMisbehavior;
122 };
123
124 class CNode
125 {
(585 . 6)(596 . 7)
127 static void ClearBanned(); // needed for unit testing
128 static bool IsBanned(unsigned int ip);
129 bool Misbehaving(int howmuch); // 1 == a little, 100 == a lot
130 void CopyStats(CNodeStats &stats);
131 };
132
133