tree checksum vpatch file split hunks
all signers: mircea_popescu trinque asciilifeform ben_vulpes mod6
antecedents: genesis
press order:
genesis | asciilifeform ben_vulpes mircea_popescu mod6 trinque |
bitcoin-asciilifeform.1 | asciilifeform ben_vulpes mod6 |
patch:
(163 . 13)(163 . 9)- 6C7B584C387898CEEE4C76D4BC56D7400105807885B5B497089F99849E04F57A2E5C775B206765F5900C3C83967C6E2A0100DAB71F314B1D28B01CAAA67667CC
5 throw runtime_error(
6 "stop\n"
7 "Stop bitcoin server.");
8 #ifndef QT_GUI
9 // Shutdown will take long enough that the response should get back
10 CreateThread(Shutdown, NULL);
11 return "bitcoin server stopping";
12 #else
13 throw runtime_error("NYI: cannot shut down GUI with RPC command");
14 #endif
15 }
16
17
(1552 . 11)(1548 . 6)
19 if (pwalletMain->IsCrypted())
20 throw JSONRPCError(-15, "Error: running with an encrypted wallet, but encryptwallet was called.");
21
22 #ifdef QT_GUI
23 // shutting down via RPC while the GUI is running does not work (yet):
24 throw runtime_error("Not Yet Implemented: use GUI to encrypt wallet, not RPC command");
25 #endif
26
27 // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string)
28 // Alternately, find a way to make params[0] mlock()'d to begin with.
29 SecureString strWalletPass;
(2184 . 9)(2175 . 7)
31 strWhatAmI.c_str(),
32 GetConfigFile().c_str(),
33 EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str());
34 #ifndef QT_GUI
35 CreateThread(Shutdown, NULL);
36 #endif
37 return;
38 }
39
(919 . 9)(919 . 7)
44 ssKey >> strKey;
45
46 // Options
47 #ifndef QT_GUI
48 if (strKey == "fGenerateBitcoins") ssValue >> fGenerateBitcoins;
49 #endif
50 if (strKey == "nTransactionFee") ssValue >> nTransactionFee;
51 if (strKey == "fLimitProcessors") ssValue >> fLimitProcessors;
52 if (strKey == "nLimitProcessors") ssValue >> nLimitProcessors;
- BAC815C59CD69F09371CBC605C3365056B02529D4FC0CD68026B6DC0304F12DAFCDA86479F52191F20F14B87C56006306E362020BA7A0651CCE2BDA87DB547AC(89 . 8)(89 . 4)
57 #include "bignum.h"
58 #include "base58.h"
59 #include "main.h"
60 #ifdef QT_GUI
61 #include "qtui.h"
62 #else
63 #include "noui.h"
64 #endif
- 9EA336B2061C743C7F9FD590A02546616D8E3FD0DEE8C9A15BB9A24E8E6138FB48F9B9BE4B7452CE1E0EB4E69E8882D2B5F03EF2D6D0B50FDB9E0A869719ECFC(12 . 16)(12 . 6)- 2118EED5CB752A2E6556FED97925061C2B9CF87C558BD328A4ABA36E51D72255D45BA461889587426DB60D2F6405187F9EB387B29666435F984AFD1F277DD8D9
69 #include <boost/filesystem/fstream.hpp>
70 #include <boost/interprocess/sync/file_lock.hpp>
71
72 #if defined(BITCOIN_NEED_QT_PLUGINS) && !defined(_BITCOIN_QT_PLUGINS_INCLUDED)
73 #define _BITCOIN_QT_PLUGINS_INCLUDED
74 #define __INSURE__
75 #include <QtPlugin>
76 Q_IMPORT_PLUGIN(qcncodecs)
77 Q_IMPORT_PLUGIN(qjpcodecs)
78 Q_IMPORT_PLUGIN(qtwcodecs)
79 Q_IMPORT_PLUGIN(qkrcodecs)
80 Q_IMPORT_PLUGIN(qtaccessiblewidgets)
81 #endif
82
83 using namespace std;
84 using namespace boost;
(91 . 7)(81 . 7)
86 //
87 // Start
88 //
89 #if !defined(QT_GUI)
90
91 int main(int argc, char* argv[])
92 {
93 bool fRet = false;
(102 . 7)(92 . 7)
95
96 return 1;
97 }
98 #endif
99
100
101 bool AppInit(int argc, char* argv[])
102 {
(206 . 10)(196 . 7)
104 #endif
105 #endif
106 " -paytxfee=<amt> \t " + _("Fee per kB to add to transactions you send\n") +
107 #ifdef QT_GUI
108 " -server \t\t " + _("Accept command line and JSON-RPC commands\n") +
109 #endif
110 #if !defined(WIN32) && !defined(QT_GUI)
111 #if !defined(WIN32)
112 " -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") +
113 #endif
114 " -testnet \t\t " + _("Use the test network\n") +
(241 . 19)(228 . 14)
116
117 // Remove tabs
118 strUsage.erase(std::remove(strUsage.begin(), strUsage.end(), '\t'), strUsage.end());
119 #if defined(QT_GUI) && defined(WIN32)
120 // On windows, show a message box, as there is no stderr
121 wxMessageBox(strUsage, "Usage");
122 #else
123 fprintf(stderr, "%s", strUsage.c_str());
124 #endif
125 return false;
126 }
127
128 fTestNet = GetBoolArg("-testnet");
129 fDebug = GetBoolArg("-debug");
130
131 #if !defined(WIN32) && !defined(QT_GUI)
132 #if !defined(WIN32)
133 fDaemon = GetBoolArg("-daemon");
134 #else
135 fDaemon = false;
(265 . 14)(247 . 11)
137 fServer = GetBoolArg("-server");
138
139 /* force fServer when running without GUI */
140 #if !defined(QT_GUI)
141 fServer = true;
142 #endif
143 fPrintToConsole = GetBoolArg("-printtoconsole");
144 fPrintToDebugger = GetBoolArg("-printtodebugger");
145 fLogTimestamps = GetBoolArg("-logtimestamps");
146
147 #ifndef QT_GUI
148 for (int i = 1; i < argc; i++)
149 if (!IsSwitchChar(argv[i][0]))
150 fCommandLine = true;
(282 . 9)(261 . 8)
152 int ret = CommandLineRPC(argc, argv);
153 exit(ret);
154 }
155 #endif
156
157 #if !defined(WIN32) && !defined(QT_GUI)
158 #if !defined(WIN32)
159 if (fDaemon)
160 {
161 // Daemonize
(541 . 10)(519 . 8)
163 if (fServer)
164 CreateThread(ThreadRPCServer, NULL);
165
166 #if !defined(QT_GUI)
167 while (1)
168 Sleep(5000);
169 #endif
170
171 return true;
172 }
(1 . 49)(0 . 0)
177 // Copyright (c) 2010 Satoshi Nakamoto
178 // Distributed under the MIT/X11 software license, see the accompanying
179 // file license.txt or http://www.opensource.org/licenses/mit-license.php.
180 #ifndef BITCOIN_EXTERNUI_H
181 #define BITCOIN_EXTERNUI_H
182
183 #include <string>
184 #include <boost/function/function0.hpp>
185 #include "wallet.h"
186
187 typedef void wxWindow;
188 #define wxYES 0x00000002
189 #define wxOK 0x00000004
190 #define wxNO 0x00000008
191 #define wxYES_NO (wxYES|wxNO)
192 #define wxCANCEL 0x00000010
193 #define wxAPPLY 0x00000020
194 #define wxCLOSE 0x00000040
195 #define wxOK_DEFAULT 0x00000000
196 #define wxYES_DEFAULT 0x00000000
197 #define wxNO_DEFAULT 0x00000080
198 #define wxCANCEL_DEFAULT 0x80000000
199 #define wxICON_EXCLAMATION 0x00000100
200 #define wxICON_HAND 0x00000200
201 #define wxICON_WARNING wxICON_EXCLAMATION
202 #define wxICON_ERROR wxICON_HAND
203 #define wxICON_QUESTION 0x00000400
204 #define wxICON_INFORMATION 0x00000800
205 #define wxICON_STOP wxICON_HAND
206 #define wxICON_ASTERISK wxICON_INFORMATION
207 #define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800)
208 #define wxFORWARD 0x00001000
209 #define wxBACKWARD 0x00002000
210 #define wxRESET 0x00004000
211 #define wxHELP 0x00008000
212 #define wxMORE 0x00010000
213 #define wxSETUP 0x00020000
214
215 extern int MyMessageBox(const std::string& message, const std::string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
216 #define wxMessageBox MyMessageBox
217 extern int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
218 extern bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption, wxWindow* parent);
219 extern void CalledSetStatusBar(const std::string& strText, int nField);
220 extern void UIThreadCall(boost::function0<void> fn);
221 extern void MainFrameRepaint();
222 extern void InitMessage(const std::string &message);
223 extern std::string _(const char* psz);
224
225 #endif
- 04D09E92EDD13820EA292BC0C0F66A9BC6F31C4020204817DE56B7AE795C660DD47D7442D32403BA58FDC75ED1985174F6C507BCDE7EE988A70185BA22FBB418(134 . 12)(134 . 11)
230 return ret;
231 }
232 #define closesocket(s) myclosesocket(s)
233 #if !defined(QT_GUI)
234 inline const char* _(const char* psz)
235 {
236 return psz;
237 }
238 #endif
239
240
241
242
- DEA54BD209FED8405BC3674FDDD237414B6C49D00B81969C22FD3F38D24D8A2B95C9E20AF3D9A0CFCC32B0D241F9A29B8742379C944DBD8D9C16120693AA4988(267 . 7)(267 . 6)
247 if (fInsertedNew || fUpdated)
248 if (!wtx.WriteToDisk())
249 return false;
250 #ifndef QT_GUI
251 // If default receiving address gets used, replace it with a new one
252 CScript scriptDefaultKey;
253 scriptDefaultKey.SetBitcoinAddress(vchDefaultKey);
(283 . 7)(282 . 6)
255 }
256 }
257 }
258 #endif
259 // Notify UI
260 vWalletUpdated.push_back(hash);
261