tree checksum vpatch file split hunks

all signers: mod6

antecedents: asciilifeform-kills-integer-retardation

press order:

genesismod6
bitcoin-asciilifeform.1mod6
rm_rf_upnpmod6
bitcoin-asciilifeform.3-turdmeister-alert-snipmod6
bitcoin-asciilifeform.2-https_snipsnipmod6
bitcoin-asciilifeform.4-goodbye-win32mod6
asciilifeform-kills-integer-retardationmod6
asciilifeform_and_now_we_have_block_dumper_correctedmod6

patch:

- CE40E0DD8882CAEED2DA59990716CDAB09D90F0E1C9AEA20688A318451E413FD943B43AC8A725192A8F95C006A99EF35D0807E8E06DEF62992356FB888B29984
+ 218B2429FAE339A7C78F2C0A978219B730025E11D88D86F4BCA05F1F9646100BEE6D510C9E5919D4EEEB9E37B0A09D381BF349F951CD17DBD8C4F9D8D849CBC3
bitcoin/src/bitcoinrpc.cpp
(1782 . 12)(1782 . 39)
5 }
6
7
8
9
10
11
12
13
14 Value dumpblock(const Array& params, bool fHelp)
15 {
16 if (fHelp || params.size() < 1 || params.size() > 2)
17 throw runtime_error(
18 "dumpblock <height> <filename>\n"
19 "Emit the block at <height> to <filename>.");
20
21 int want_height = 0;
22 if (params.size() > 0)
23 want_height = params[0].get_int();
24
25 if (want_height > nBestHeight)
26 throw runtime_error("Requested block exceeds current nBestHeight!\n");
27
28 // path to dump block to
29 string filename = params[1].get_str();
30
31 // this is O(n^2)...
32 // possibly could be improved if we descend from best height if requested height is closer to it
33 for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
34 {
35 CBlockIndex *pindex = (*mi).second;
36 if (pindex->nHeight == want_height) {
37 CBlock block;
38 block.ReadFromDisk(pindex);
39 printf("Dumping block %d to %s\n", want_height, filename.c_str());
40 CAutoFile fileout = fopen(filename.c_str(), "wb+");
41 fileout << block;
42 return true;
43 }
44 }
45 return false;
46 }
47
48
49
(1837 . 6)(1864 . 7)
51 make_pair("settxfee", &settxfee),
52 make_pair("getmemorypool", &getmemorypool),
53 make_pair("listsinceblock", &listsinceblock),
54 make_pair("dumpblock", &dumpblock),
55 };
56 map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
57
(1863 . 6)(1891 . 7)
59 "validateaddress",
60 "getwork",
61 "getmemorypool",
62 "dumpblock",
63 };
64 set<string> setAllowInSafeMode(pAllowInSafeMode, pAllowInSafeMode + sizeof(pAllowInSafeMode)/sizeof(pAllowInSafeMode[0]));
65
(2364 . 6)(2393 . 7)
67 if (strMethod == "listaccounts" && n > 0) ConvertTo<boost::int64_t>(params[0]);
68 if (strMethod == "walletpassphrase" && n > 1) ConvertTo<boost::int64_t>(params[1]);
69 if (strMethod == "listsinceblock" && n > 1) ConvertTo<boost::int64_t>(params[1]);
70 if (strMethod == "dumpblock" && n > 0) ConvertTo<boost::int64_t>(params[0]);
71 if (strMethod == "sendmany" && n > 1)
72 {
73 string s = params[1].get_str();