tree checksum vpatch file split hunks

all signers: mod6

antecedents: bitcoin-asciilifeform.1 genesis mod6_der_high_low_s asciilifeform_lets_lose_testnet

press order:

genesismod6
bitcoin-asciilifeform.1mod6
rm_rf_upnpmod6
bitcoin-asciilifeform.3-turdmeister-alert-snipmod6
asciilifeform_orphanage_thermonukemod6
bitcoin-asciilifeform.2-https_snipsnipmod6
bitcoin-v0_5_3_1-static_makefile_v002.8mod6
bitcoin-asciilifeform.4-goodbye-win32mod6
bitcoin-v0_5_3_1-rev_bump.7mod6
asciilifeform_tx-orphanage_amputationmod6
asciilifeform_dnsseed_snipsnipmod6
asciilifeform_zap_hardcoded_seedsmod6
asciilifeform_zap_showmyip_crudmod6
asciilifeform_dns_thermonyukyoolar_kleansingmod6
asciilifeform_ver_now_5_4_and_irc_is_gone_and_now_must_give_ipmod6
asciilifeform-kills-integer-retardationmod6
asciilifeform_and_now_we_have_block_dumper_correctedmod6
mod6_fix_dumpblock_paramsmod6
asciilifeform_and_now_we_have_eatblockmod6
asciilifeform_lets_lose_testnetmod6
asciilifeform_add_verifyall_optionmod6
programmable-versionstringmod6
mod6_der_high_low_smod6
mod6_privkey_toolsmod6

patch:

- 935818D95D5E80E25A0992801B4A01D8F18998A63A6949B46832C2D1AE0A6DBBB4AC7CCA5AD4E857D1B7A1AF3B537C7FCD6A60727C1B211FCFD0723E00D96314
+ 61E768E9DC7CBB1429A3564FB2A48502A4371C61BD39893914FCB1DE262BC3A727E5AE9E1CF84A14ABB573E2034D603C3F7D58BCEB3700F625E476D5B732AFB2
bitcoin/src/base58.h
(18 . 6)(18 . 7)
5 #include <string>
6 #include <vector>
7 #include "bignum.h"
8 #include "key.h"
9
10 static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
11
(315 . 4)(316 . 32)
13 }
14 };
15
16 /** A base58-encoded secret key */
17 class CBitcoinSecret : public CBase58Data
18 {
19 public:
20 void SetSecret(const CSecret& vchSecret)
21 {
22 assert(vchSecret.size() == 32);
23 SetData(128, &vchSecret[0], vchSecret.size());
24 }
25
26 CSecret GetSecret()
27 {
28 CSecret vchSecret;
29 vchSecret.resize(32);
30 memcpy(&vchSecret[0], &vchData[0], 32);
31 return vchSecret;
32 }
33
34 CBitcoinSecret(const CSecret& vchSecret)
35 {
36 SetSecret(vchSecret);
37 }
38
39 CBitcoinSecret()
40 {
41 }
42 };
43
44 #endif
- CA28A67C52B37D372E22B124EECB4E136925110DB1132AE122A1F47B20E60BFC7ABDD76ABCBB03ABF026E6900FD377CED5A983026F1B7B6C9CB26EF3FAADE0EF
+ AE34BF1F54A0BEDDFD8679AF42CC1E0AB540CDAEBFF1C1381E2B055970CE80106025148A785DEBFF3C728F16365A05D00E96A30A46AA11A7D01B4ACBE4BF4734
bitcoin/src/bitcoinrpc.cpp
(7 . 6)(7 . 7)
49 #include "db.h"
50 #include "net.h"
51 #include "init.h"
52 #include "util.h"
53 #undef printf
54 #include <boost/asio.hpp>
55 #include <boost/iostreams/concepts.hpp>
(584 . 7)(585 . 7)
57 if (!key.SetCompactSignature(Hash(ss.begin(), ss.end()), vchSig))
58 return false;
59
60 return (key.GetAddress() == addr);
61 return (CBitcoinAddress(key.GetPubKey()) == addr);
62 }
63
64
(1838 . 6)(1839 . 60)
66 } // ... but will return 'false' if we already have the block.
67
68
69 Value importprivkey(const Array& params, bool fHelp)
70 {
71 if (fHelp || params.size() < 1 || params.size() > 2)
72 throw runtime_error(
73 "importprivkey <bitcoinprivkey> [label]\n"
74 "Adds a private key (as returned by dumpprivkey) to your wallet.");
75
76 string strSecret = params[0].get_str();
77 string strLabel = "";
78 if (params.size() > 1)
79 strLabel = params[1].get_str();
80 CBitcoinSecret vchSecret;
81 bool fGood = vchSecret.SetString(strSecret);
82
83 if (!fGood) throw JSONRPCError(-5,"Invalid private key");
84
85 CKey key;
86 CSecret secret = vchSecret.GetSecret();
87 key.SetSecret(secret);
88 CBitcoinAddress vchAddress = CBitcoinAddress(key.GetPubKey());
89
90 CRITICAL_BLOCK(cs_main)
91 CRITICAL_BLOCK(pwalletMain->cs_wallet)
92 {
93 pwalletMain->MarkDirty();
94 pwalletMain->SetAddressBookName(vchAddress, strLabel);
95
96 if (!pwalletMain->AddKey(key))
97 throw JSONRPCError(-4,"Error adding key to wallet");
98
99 pwalletMain->ScanForWalletTransactions(pindexGenesisBlock, true);
100 pwalletMain->ReacceptWalletTransactions();
101 }
102
103 return Value::null;
104 }
105
106 Value dumpprivkey(const Array& params, bool fHelp)
107 {
108 if (fHelp || params.size() != 1)
109 throw runtime_error(
110 "dumpprivkey <bitcoinaddress>\n"
111 "Reveals the private key corresponding to <bitcoinaddress>.");
112
113 string strAddress = params[0].get_str();
114 CBitcoinAddress address;
115 if (!address.SetString(strAddress))
116 throw JSONRPCError(-5, "Invalid bitcoin address");
117 CSecret vchSecret;
118 if (!pwalletMain->GetSecret(address, vchSecret))
119 throw JSONRPCError(-4,"Private key for address " + strAddress + " is not known");
120 return CBitcoinSecret(vchSecret).ToString();
121 }
122
123
124 //
125 // Call Table
(1887 . 6)(1942 . 8)
127 make_pair("listsinceblock", &listsinceblock),
128 make_pair("dumpblock", &dumpblock),
129 make_pair("eatblock", &eatblock),
130 make_pair("importprivkey", &importprivkey),
131 make_pair("dumpprivkey", &dumpprivkey),
132 };
133 map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
134
- 36DDD67BA47C3860BA5747A2388B11E4CB3ED91AE1BC54A051F773E7958D3EC08CBD029607D1878661D644D34910098027600CD7E1BD08ACA059452CF03FD0E8
+ 900B12956730C16E78DCF97A12B7559168326A21A163A67556C6B0939577E2C7D8325CC1D5AEAEE4F1F00961ACE35853EB5785A5FE4BE059E7BD46BB285E01D2
bitcoin/src/key.h
(14 . 7)(14 . 6)
139
140 #include "serialize.h"
141 #include "uint256.h"
142 #include "base58.h"
143
144 // secp160k1
145 // const unsigned int PRIVATE_KEY_SIZE = 192;
(419 . 12)(418 . 6)
147 return true;
148 }
149
150 // Get the address corresponding to this key
151 CBitcoinAddress GetAddress() const
152 {
153 return CBitcoinAddress(GetPubKey());
154 }
155
156 bool IsValid()
157 {
158 if (!fSet)
- 8E9AABB0569D092A6B1BFF5015211A38475530B28614A7163ADE52496314094BC00FD443EAFB66F1285EAA1C69A680233A3E6044058598D2E2CFFCF8797E0CC0
+ 23ACFCC108928F23FDA3010395311EB99BE7D55A519BFABE33630D7C948495CCC7325961C7A379E0EFB012C895A28D073435B57FFA4CEA8F19F22CE9149989BB
bitcoin/src/keystore.cpp
(29 . 7)(29 . 7)
163 bool CBasicKeyStore::AddKey(const CKey& key)
164 {
165 CRITICAL_BLOCK(cs_KeyStore)
166 mapKeys[key.GetAddress()] = key.GetSecret();
167 mapKeys[CBitcoinAddress(key.GetPubKey())] = key.GetSecret();
168 return true;
169 }
170
- 5E302C824B6802E5AC88277F9DCCA66B645A2E6932713EF817B6E3352CEF123BB4492FDB19ACAE7236A090715770D9D623C209218BCD2745C1277D3172EF30D5
+ 8BB123A590F5D5A536628E640847DF536F8857AFEBA467F2503DEEB728576FF0CFB2C450159D7E303D6292113DBA473A16C364507D57290216EDBC73B2A2396C
bitcoin/src/keystore.h
(28 . 6)(28 . 15)
175 // This may succeed even if GetKey fails (e.g., encrypted wallets)
176 virtual bool GetPubKey(const CBitcoinAddress &address, std::vector<unsigned char>& vchPubKeyOut) const;
177
178 virtual bool GetSecret(const CBitcoinAddress &address, CSecret& vchSecret) const
179 {
180 CKey key;
181 if (!GetKey(address, key))
182 return false;
183 vchSecret = key.GetSecret();
184 return true;
185 }
186
187 // Generate a new key, and add it to the store
188 virtual std::vector<unsigned char> GenerateNewKey();
189 };
- C95A36390729D1D846DC7036D5489178A361AF69D310DCC250096DEAE764729550AC117096ADF54084FD0F9A7798228C8282656441CBA93351D810001F4D311B
+ B1151747313461AAA55B9B7B3A0BF0E560F3D9200B646859DE29B07543D3CB746F109004610AC55433C6A803D59C5CD3C092C4D187999997CADFB85A762BDA74
bitcoin/src/wallet.cpp
(224 . 6)(224 . 15)
194 }
195 }
196
197 void CWallet::MarkDirty()
198 {
199 CRITICAL_BLOCK(cs_wallet)
200 {
201 BOOST_FOREACH(PAIRTYPE(const uint256, CWalletTx)& item, mapWallet)
202 item.second.MarkDirty();
203 }
204 }
205
206 bool CWallet::AddToWallet(const CWalletTx& wtxIn)
207 {
208 uint256 hash = wtxIn.GetHash();
- DF93B83C3880E14D890FE853D8556EEC6377B90D5E83BD696F4C5800042C2CD04C5242B69B8886E22DFCEB5B9B16E790FB526E9039CC130C9FB0F12CC8BB19D2
+ 61326C2A68A1CEEF4A6D0512F02C291BFE7025275E52F69744D3BFEC0AB8A41FA62E819AAEBC151762F42BE182ACE3E9EF4F506A36AEDF24AD204E60284E14A4
bitcoin/src/wallet.h
(73 . 6)(73 . 7)
213 bool Unlock(const SecureString& strWalletPassphrase);
214 bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
215 bool EncryptWallet(const SecureString& strWalletPassphrase);
216 void MarkDirty();
217
218 bool AddToWallet(const CWalletTx& wtxIn);
219 bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false);