tree checksum vpatch file split hunks

all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6

antecedents: asciilifeform-kills-integer-retardation

press order:

genesisasciilifeform ben_vulpes mircea_popescu mod6 trinque
bitcoin-asciilifeform.1asciilifeform ben_vulpes mod6
rm_rf_upnpasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.3-turdmeister-alert-snipasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.2-https_snipsnipasciilifeform ben_vulpes mod6
bitcoin-asciilifeform.4-goodbye-win32asciilifeform ben_vulpes mod6
asciilifeform-kills-integer-retardationasciilifeform ben_vulpes mod6
asciilifeform_and_now_we_have_block_dumper_correctedasciilifeform ben_vulpes mod6

patch:

- CFC24BCE544BA71ED8E7E876A1074DC89DA184C6AA7F0FC2AD8D0C213516B2B9539497D3176DD0A17CCB427D687CE8D3CC4D3B9969802C9DA5F05A0617A2A30B
+ D5EDC4C67519900497DC7F576070808E67519D2921981C63FC5C80D14DC2F8040544CD1C79AC202194DFA07FAFD6245EBED5BAB25B86CF5EFB9E901659D0D8B5
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();