Manual merge of jaromil's source tree reorg commit.
authorJeff Garzik <jeff@garzik.org>
Mon, 9 May 2011 18:00:14 +0000 (14:00 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 9 May 2011 18:00:14 +0000 (14:00 -0400)
Conflicts:
src/sha256.cpp

23 files changed:
contrib/gitian.yml
doc/build-unix.txt
locale/de/LC_MESSAGES/bitcoin.po
locale/es/LC_MESSAGES/bitcoin.po
locale/fr/LC_MESSAGES/bitcoin.po
locale/it/LC_MESSAGES/bitcoin.po
locale/nl/LC_MESSAGES/bitcoin.po
locale/pt/LC_MESSAGES/bitcoin.po
locale/ru/LC_MESSAGES/bitcoin.po
share/setup.nsi
share/uiproject.fbp
src/db.cpp
src/init.cpp
src/main.cpp
src/main.h
src/makefile.unix
src/rpc.cpp
src/serialize.h
src/sha256.cpp [deleted file]
src/ui.cpp
src/ui.h
src/uibase.cpp
src/uibase.h

index 92385e5..5d12f72 100644 (file)
@@ -18,20 +18,29 @@ remotes:
   "dir": "bitcoin"
 files:
 - "wxWidgets-2.9.1.tar.bz2"
+- "miniupnpc-1.5.tar.gz"
 script: |
   INSTDIR="$HOME/install"
   export LIBRARY_PATH="$INSTDIR/lib"
+  #
+  tar xzf miniupnpc-1.5.tar.gz
+  cd miniupnpc-1.5
+  INSTALLPREFIX=$INSTDIR make $MAKEOPTS install
+  cd ..
+  #
   tar xjf wxWidgets-2.9.1.tar.bz2
   cd wxWidgets-2.9.1
   ./configure --prefix=$INSTDIR --enable-monolithic --disable-shared
   perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h
   make $MAKEOPTS install
-  cd ../bitcoin
+  cd ..
+  #
+  cd bitcoin
   mkdir -p $OUTDIR/src
   cp -a . $OUTDIR/src
   rm -rf $OUTDIR/src/.git
   mv $OUTDIR/src/locale $OUTDIR
   cp $OUTDIR/src/license.txt $OUTDIR
-  make -f makefile.unix $MAKEOPTS  WXLIBS="-Wl,-Bstatic -l wx_gtk2u-2.9 -Wl,-Bdynamic -l gtk-x11-2.0 -l SM -l Xxf86vm" INCLUDEPATHS="`$INSTDIR/bin/wx-config --cflags`" bitcoin bitcoind
+  PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin bitcoind
   mkdir -p $OUTDIR/bin/$GBUILD_BITS
-  cp bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS
+  install -s bitcoin bitcoind $OUTDIR/bin/$GBUILD_BITS
index 4494c75..0c4e88e 100644 (file)
@@ -39,9 +39,12 @@ You need to download wxWidgets from http://www.wxwidgets.org/downloads/
 and build it yourself.  See the build instructions and configure parameters
 below.
 
-Requires miniupnpc for UPnP port mapping.  To compile with UPnP support,
-install miniupnpc and compile after setting USE_UPNP.  It can be downloaded
-from http://miniupnp.tuxfamily.org/files/.  
+Requires miniupnpc for UPnP port mapping.  It can be downloaded from
+http://miniupnp.tuxfamily.org/files/.  UPnP support is compiled in and
+turned off by default.  Set USE_UPNP to a different value to control this:
+USE_UPNP=   no UPnP support, miniupnp not required;
+USE_UPNP=0  (the default) UPnP support turned off by default at runtime;
+USE_UPNP=1  UPnP support turned on by default at runtime.
 
 Licenses of statically linked libraries:
 wxWidgets      LGPL 2.1 with very liberal exceptions
@@ -75,7 +78,7 @@ tar -xzvf wxWidgets-2.9.0.tar.gz
 cd wxWidgets-2.9.0
 mkdir buildgtk
 cd buildgtk
-../configure --with-gtk --enable-debug --disable-shared --enable-monolithic
+../configure --with-gtk --enable-debug --disable-shared --enable-monolithic --without-libpng --disable-svg
 make
 sudo su
 make install
index 33b32d1..7504db1 100644 (file)
@@ -531,11 +531,6 @@ msgstr "Bitcoin Ö&ffnen"
 msgid "O&ptions..."
 msgstr "O&ptionen..."
 
-#: ../../../ui.cpp:2502
-#: ../../../uibase.cpp:34
-msgid "&Generate Coins"
-msgstr "Münzen Er&zeugen"
-
 #: ../../../ui.cpp:2505
 #: ../../../uibase.cpp:27
 msgid "E&xit"
index 0617ab4..5f4bef8 100644 (file)
@@ -556,11 +556,6 @@ msgstr "&Abrir Bitcoin"
 msgid "O&ptions..."
 msgstr "O&pciones"
 
-#: ../../../ui.cpp:2521
-#: ../../../uibase.cpp:32
-msgid "&Generate Coins"
-msgstr "&Generar monedas"
-
 #: ../../../ui.cpp:2524
 #: ../../../uibase.cpp:25
 msgid "E&xit"
index b173364..a714e01 100644 (file)
@@ -559,11 +559,6 @@ msgstr "&Ouvrir Bitcoin"
 msgid "O&ptions..."
 msgstr "O&ptions..."
 
-#: ../../../ui.cpp:2521
-#: ../../../uibase.cpp:32
-msgid "&Generate Coins"
-msgstr "&Générer des pièces"
-
 #: ../../../ui.cpp:2524
 #: ../../../uibase.cpp:25
 msgid "E&xit"
index cf13239..ccb74ea 100644 (file)
@@ -527,11 +527,6 @@ msgstr "&Apri Bitcoin"
 msgid "O&ptions..."
 msgstr "O&pzioni..."
 
-#: ../../../ui.cpp:2502
-#: ../../../uibase.cpp:34
-msgid "&Generate Coins"
-msgstr "&Genera monete"
-
 #: ../../../ui.cpp:2505
 #: ../../../uibase.cpp:27
 msgid "E&xit"
index 2e30388..399ad8b 100644 (file)
@@ -528,11 +528,6 @@ msgstr "&Open Bitcoin"
 msgid "O&ptions..."
 msgstr "O&pties"
 
-#: ../../../ui.cpp:2502
-#: ../../../uibase.cpp:34
-msgid "&Generate Coins"
-msgstr "&Genereer coins"
-
 #: ../../../ui.cpp:2505
 #: ../../../uibase.cpp:27
 msgid "E&xit"
index 9bf193e..040fb1d 100644 (file)
@@ -527,11 +527,6 @@ msgstr "&Abrir Bitcoin"
 msgid "O&ptions..."\r
 msgstr "O&pções"\r
 \r
-#: ../../../ui.cpp:2502\r
-#: ../../../uibase.cpp:34\r
-msgid "&Generate Coins"\r
-msgstr "&Gerar Moedas"\r
-\r
 #: ../../../ui.cpp:2505\r
 #: ../../../uibase.cpp:27\r
 msgid "E&xit"\r
index 5a87259..545f54d 100644 (file)
@@ -587,11 +587,6 @@ msgstr "&Открыть Bitcoin"
 msgid "O&ptions..."
 msgstr "О&пции..."
 
-#: ../../../ui.cpp:2713
-#: ../../../uibase.cpp:32
-msgid "&Generate Coins"
-msgstr "&Генерировать монеты"
-
 #: ../../../ui.cpp:2716
 #: ../../../uibase.cpp:25
 msgid "E&xit"
index a4efc60..b17e553 100644 (file)
@@ -4,7 +4,7 @@ RequestExecutionLevel highest
 \r
 # General Symbol Definitions\r
 !define REGKEY "SOFTWARE\$(^Name)"\r
-!define VERSION 0.3.21\r
+!define VERSION 0.3.22\r
 !define COMPANY "Bitcoin project"\r
 !define URL http://www.bitcoin.org/\r
 \r
@@ -39,12 +39,12 @@ Var StartMenuGroup
 !insertmacro MUI_LANGUAGE English\r
 \r
 # Installer attributes\r
-OutFile bitcoin-0.3.21-win32-setup.exe\r
+OutFile bitcoin-0.3.22-win32-setup.exe\r
 InstallDir $PROGRAMFILES\Bitcoin\r
 CRCCheck on\r
 XPStyle on\r
 ShowInstDetails show\r
-VIProductVersion 0.3.21.0\r
+VIProductVersion 0.3.22.0\r
 VIAddVersionKey ProductName Bitcoin\r
 VIAddVersionKey ProductVersion "${VERSION}"\r
 VIAddVersionKey CompanyName "${COMPANY}"\r
index d55566e..d9d4638 100644 (file)
                         <property name="checked">0</property>\r
                         <property name="enabled">1</property>\r
                         <property name="help"></property>\r
-                        <property name="id">wxID_OPTIONSGENERATEBITCOINS</property>\r
-                        <property name="kind">wxITEM_CHECK</property>\r
-                        <property name="label">&amp;Generate Coins</property>\r
-                        <property name="name">m_menuOptionsGenerateBitcoins</property>\r
-                        <property name="permission">none</property>\r
-                        <property name="shortcut"></property>\r
-                        <property name="unchecked_bitmap"></property>\r
-                        <event name="OnMenuSelection">OnMenuOptionsGenerate</event>\r
-                        <event name="OnUpdateUI">OnUpdateUIOptionsGenerate</event>\r
-                    </object>\r
-                    <object class="wxMenuItem" expanded="1">\r
-                        <property name="bitmap"></property>\r
-                        <property name="checked">0</property>\r
-                        <property name="enabled">1</property>\r
-                        <property name="help"></property>\r
                         <property name="id">wxID_ANY</property>\r
                         <property name="kind">wxITEM_NORMAL</property>\r
                         <property name="label">&amp;Your Receiving Addresses...</property>\r
                                                 </object>\r
                                                 <object class="sizeritem" expanded="1">\r
                                                     <property name="border">5</property>\r
-                                                    <property name="flag"></property>\r
-                                                    <property name="proportion">0</property>\r
-                                                    <object class="wxBoxSizer" expanded="1">\r
-                                                        <property name="minimum_size"></property>\r
-                                                        <property name="name">bSizer71</property>\r
-                                                        <property name="orient">wxHORIZONTAL</property>\r
-                                                        <property name="permission">none</property>\r
-                                                        <object class="sizeritem" expanded="1">\r
-                                                            <property name="border">5</property>\r
-                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>\r
-                                                            <property name="proportion">0</property>\r
-                                                            <object class="wxCheckBox" expanded="1">\r
-                                                                <property name="bg"></property>\r
-                                                                <property name="checked">0</property>\r
-                                                                <property name="context_help"></property>\r
-                                                                <property name="enabled">1</property>\r
-                                                                <property name="fg"></property>\r
-                                                                <property name="font"></property>\r
-                                                                <property name="hidden">0</property>\r
-                                                                <property name="id">wxID_ANY</property>\r
-                                                                <property name="label">&amp;Limit coin generation to</property>\r
-                                                                <property name="maximum_size"></property>\r
-                                                                <property name="minimum_size"></property>\r
-                                                                <property name="name">m_checkBoxLimitProcessors</property>\r
-                                                                <property name="permission">protected</property>\r
-                                                                <property name="pos"></property>\r
-                                                                <property name="size"></property>\r
-                                                                <property name="style"></property>\r
-                                                                <property name="subclass"></property>\r
-                                                                <property name="tooltip"></property>\r
-                                                                <property name="validator_data_type"></property>\r
-                                                                <property name="validator_style">wxFILTER_NONE</property>\r
-                                                                <property name="validator_type">wxDefaultValidator</property>\r
-                                                                <property name="validator_variable"></property>\r
-                                                                <property name="window_extra_style"></property>\r
-                                                                <property name="window_name"></property>\r
-                                                                <property name="window_style"></property>\r
-                                                                <event name="OnChar"></event>\r
-                                                                <event name="OnCheckBox">OnCheckBoxLimitProcessors</event>\r
-                                                                <event name="OnEnterWindow"></event>\r
-                                                                <event name="OnEraseBackground"></event>\r
-                                                                <event name="OnKeyDown"></event>\r
-                                                                <event name="OnKeyUp"></event>\r
-                                                                <event name="OnKillFocus"></event>\r
-                                                                <event name="OnLeaveWindow"></event>\r
-                                                                <event name="OnLeftDClick"></event>\r
-                                                                <event name="OnLeftDown"></event>\r
-                                                                <event name="OnLeftUp"></event>\r
-                                                                <event name="OnMiddleDClick"></event>\r
-                                                                <event name="OnMiddleDown"></event>\r
-                                                                <event name="OnMiddleUp"></event>\r
-                                                                <event name="OnMotion"></event>\r
-                                                                <event name="OnMouseEvents"></event>\r
-                                                                <event name="OnMouseWheel"></event>\r
-                                                                <event name="OnPaint"></event>\r
-                                                                <event name="OnRightDClick"></event>\r
-                                                                <event name="OnRightDown"></event>\r
-                                                                <event name="OnRightUp"></event>\r
-                                                                <event name="OnSetFocus"></event>\r
-                                                                <event name="OnSize"></event>\r
-                                                                <event name="OnUpdateUI"></event>\r
-                                                            </object>\r
-                                                        </object>\r
-                                                        <object class="sizeritem" expanded="1">\r
-                                                            <property name="border">5</property>\r
-                                                            <property name="flag">wxALIGN_CENTER_VERTICAL</property>\r
-                                                            <property name="proportion">0</property>\r
-                                                            <object class="wxSpinCtrl" expanded="1">\r
-                                                                <property name="bg"></property>\r
-                                                                <property name="context_help"></property>\r
-                                                                <property name="enabled">1</property>\r
-                                                                <property name="fg"></property>\r
-                                                                <property name="font"></property>\r
-                                                                <property name="hidden">0</property>\r
-                                                                <property name="id">wxID_ANY</property>\r
-                                                                <property name="initial">1</property>\r
-                                                                <property name="max">999</property>\r
-                                                                <property name="maximum_size"></property>\r
-                                                                <property name="min">1</property>\r
-                                                                <property name="minimum_size"></property>\r
-                                                                <property name="name">m_spinCtrlLimitProcessors</property>\r
-                                                                <property name="permission">protected</property>\r
-                                                                <property name="pos"></property>\r
-                                                                <property name="size">48,-1</property>\r
-                                                                <property name="style">wxSP_ARROW_KEYS</property>\r
-                                                                <property name="subclass"></property>\r
-                                                                <property name="tooltip"></property>\r
-                                                                <property name="validator_data_type"></property>\r
-                                                                <property name="validator_style">wxFILTER_NONE</property>\r
-                                                                <property name="validator_type">wxDefaultValidator</property>\r
-                                                                <property name="validator_variable"></property>\r
-                                                                <property name="value"></property>\r
-                                                                <property name="window_extra_style"></property>\r
-                                                                <property name="window_name"></property>\r
-                                                                <property name="window_style"></property>\r
-                                                                <event name="OnChar"></event>\r
-                                                                <event name="OnEnterWindow"></event>\r
-                                                                <event name="OnEraseBackground"></event>\r
-                                                                <event name="OnKeyDown"></event>\r
-                                                                <event name="OnKeyUp"></event>\r
-                                                                <event name="OnKillFocus"></event>\r
-                                                                <event name="OnLeaveWindow"></event>\r
-                                                                <event name="OnLeftDClick"></event>\r
-                                                                <event name="OnLeftDown"></event>\r
-                                                                <event name="OnLeftUp"></event>\r
-                                                                <event name="OnMiddleDClick"></event>\r
-                                                                <event name="OnMiddleDown"></event>\r
-                                                                <event name="OnMiddleUp"></event>\r
-                                                                <event name="OnMotion"></event>\r
-                                                                <event name="OnMouseEvents"></event>\r
-                                                                <event name="OnMouseWheel"></event>\r
-                                                                <event name="OnPaint"></event>\r
-                                                                <event name="OnRightDClick"></event>\r
-                                                                <event name="OnRightDown"></event>\r
-                                                                <event name="OnRightUp"></event>\r
-                                                                <event name="OnSetFocus"></event>\r
-                                                                <event name="OnSize"></event>\r
-                                                                <event name="OnSpinCtrl"></event>\r
-                                                                <event name="OnSpinCtrlText"></event>\r
-                                                                <event name="OnUpdateUI"></event>\r
-                                                            </object>\r
-                                                        </object>\r
-                                                        <object class="sizeritem" expanded="1">\r
-                                                            <property name="border">5</property>\r
-                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>\r
-                                                            <property name="proportion">0</property>\r
-                                                            <object class="wxStaticText" expanded="1">\r
-                                                                <property name="bg"></property>\r
-                                                                <property name="context_help"></property>\r
-                                                                <property name="enabled">1</property>\r
-                                                                <property name="fg"></property>\r
-                                                                <property name="font"></property>\r
-                                                                <property name="hidden">0</property>\r
-                                                                <property name="id">wxID_ANY</property>\r
-                                                                <property name="label">processors</property>\r
-                                                                <property name="maximum_size"></property>\r
-                                                                <property name="minimum_size"></property>\r
-                                                                <property name="name">m_staticText35</property>\r
-                                                                <property name="permission">protected</property>\r
-                                                                <property name="pos"></property>\r
-                                                                <property name="size"></property>\r
-                                                                <property name="style"></property>\r
-                                                                <property name="subclass"></property>\r
-                                                                <property name="tooltip"></property>\r
-                                                                <property name="validator_data_type"></property>\r
-                                                                <property name="validator_style">wxFILTER_NONE</property>\r
-                                                                <property name="validator_type">wxDefaultValidator</property>\r
-                                                                <property name="validator_variable"></property>\r
-                                                                <property name="window_extra_style"></property>\r
-                                                                <property name="window_name"></property>\r
-                                                                <property name="window_style"></property>\r
-                                                                <property name="wrap">-1</property>\r
-                                                                <event name="OnChar"></event>\r
-                                                                <event name="OnEnterWindow"></event>\r
-                                                                <event name="OnEraseBackground"></event>\r
-                                                                <event name="OnKeyDown"></event>\r
-                                                                <event name="OnKeyUp"></event>\r
-                                                                <event name="OnKillFocus"></event>\r
-                                                                <event name="OnLeaveWindow"></event>\r
-                                                                <event name="OnLeftDClick"></event>\r
-                                                                <event name="OnLeftDown"></event>\r
-                                                                <event name="OnLeftUp"></event>\r
-                                                                <event name="OnMiddleDClick"></event>\r
-                                                                <event name="OnMiddleDown"></event>\r
-                                                                <event name="OnMiddleUp"></event>\r
-                                                                <event name="OnMotion"></event>\r
-                                                                <event name="OnMouseEvents"></event>\r
-                                                                <event name="OnMouseWheel"></event>\r
-                                                                <event name="OnPaint"></event>\r
-                                                                <event name="OnRightDClick"></event>\r
-                                                                <event name="OnRightDown"></event>\r
-                                                                <event name="OnRightUp"></event>\r
-                                                                <event name="OnSetFocus"></event>\r
-                                                                <event name="OnSize"></event>\r
-                                                                <event name="OnUpdateUI"></event>\r
-                                                            </object>\r
-                                                        </object>\r
-                                                    </object>\r
-                                                </object>\r
-                                                <object class="sizeritem" expanded="1">\r
-                                                    <property name="border">5</property>\r
                                                     <property name="flag">wxALL</property>\r
                                                     <property name="proportion">0</property>\r
                                                     <object class="wxCheckBox" expanded="1">\r
index 28a8b71..071231c 100644 (file)
@@ -778,10 +778,10 @@ bool CWalletDB::LoadWallet()
                 string strKey;
                 ssKey >> strKey;
 
-                // Menu state
-                if (strKey == "fGenerateBitcoins")  ssValue >> fGenerateBitcoins;
-
                 // Options
+#ifndef GUI
+                if (strKey == "fGenerateBitcoins")  ssValue >> fGenerateBitcoins;
+#endif
                 if (strKey == "nTransactionFee")    ssValue >> nTransactionFee;
                 if (strKey == "addrIncoming")       ssValue >> addrIncoming;
                 if (strKey == "fLimitProcessors")   ssValue >> fLimitProcessors;
index 8f72181..a8e9314 100644 (file)
@@ -326,7 +326,7 @@ bool AppInit2(int argc, char* argv[])
     // Make sure only a single bitcoin process is using the data directory.
     string strLockFile = GetDataDir() + "/.lock";
     FILE* file = fopen(strLockFile.c_str(), "a"); // empty lock file; created if it doesn't exist.
-    fclose(file);
+    if (file) fclose(file);
     static boost::interprocess::file_lock lock(strLockFile.c_str());
     if (!lock.try_lock())
     {
index 4c8f20c..2cdde5b 100644 (file)
@@ -681,8 +681,8 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi
     if (GetSigOpCount() > nSize / 34 || nSize < 100)
         return error("AcceptToMemoryPool() : nonstandard transaction");
 
-    // Rather not work on nonstandard transactions
-    if (!IsStandard())
+    // Rather not work on nonstandard transactions (unless -testnet)
+    if (!fTestNet && !IsStandard())
         return error("AcceptToMemoryPool() : nonstandard transaction type");
 
     // Do we already have it?
@@ -3145,71 +3145,6 @@ void ThreadBitcoinMiner(void* parg)
     printf("ThreadBitcoinMiner exiting, %d threads remaining\n", vnThreadsRunning[3]);
 }
 
-#if defined(__GNUC__) && defined(CRYPTOPP_X86_ASM_AVAILABLE)
-void CallCPUID(int in, int& aret, int& cret)
-{
-    int a, c;
-    asm (
-        "mov %2, %%eax; " // in into eax
-        "cpuid;"
-        "mov %%eax, %0;" // eax into a
-        "mov %%ecx, %1;" // ecx into c
-        :"=r"(a),"=r"(c) /* output */
-        :"r"(in) /* input */
-        :"%eax","%ebx","%ecx","%edx" /* clobbered register */
-    );
-    aret = a;
-    cret = c;
-}
-
-bool Detect128BitSSE2()
-{
-    int a, c, nBrand;
-    CallCPUID(0, a, nBrand);
-    bool fIntel = (nBrand == 0x6c65746e); // ntel
-    bool fAMD = (nBrand == 0x444d4163); // cAMD
-
-    struct
-    {
-        unsigned int nStepping : 4;
-        unsigned int nModel : 4;
-        unsigned int nFamily : 4;
-        unsigned int nProcessorType : 2;
-        unsigned int nUnused : 2;
-        unsigned int nExtendedModel : 4;
-        unsigned int nExtendedFamily : 8;
-    }
-    cpu;
-    CallCPUID(1, a, c);
-    memcpy(&cpu, &a, sizeof(cpu));
-    int nFamily = cpu.nExtendedFamily + cpu.nFamily;
-    int nModel = cpu.nExtendedModel*16 + cpu.nModel;
-
-    // We need Intel Nehalem or AMD K10 or better for 128bit SSE2
-    // Nehalem = i3/i5/i7 and some Xeon
-    // K10 = Opterons with 4 or more cores, Phenom, Phenom II, Athlon II
-    //  Intel Core i5  family 6, model 26 or 30
-    //  Intel Core i7  family 6, model 26 or 30
-    //  Intel Core i3  family 6, model 37
-    //  AMD Phenom    family 16, model 10
-    bool fUseSSE2 = ((fIntel && nFamily * 10000 + nModel >=  60026) ||
-                     (fAMD   && nFamily * 10000 + nModel >= 160010));
-
-    // AMD reports a lower model number in 64-bit mode
-    if (fAMD && sizeof(void*) > 4 && nFamily * 10000 + nModel >= 160000)
-        fUseSSE2 = true;
-
-    static bool fPrinted;
-    if (!fPrinted)
-    {
-        fPrinted = true;
-        printf("CPUID %08x family %d, model %d, stepping %d, fUseSSE2=%d\n", nBrand, nFamily, nModel, cpu.nStepping, fUseSSE2);
-    }
-    return fUseSSE2;
-}
-#else
-bool Detect128BitSSE2() { return false; }
-#endif
 
 int FormatHashBlocks(void* pbuffer, unsigned int len)
 {
@@ -3270,9 +3205,6 @@ unsigned int ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1, char*
     }
 }
 
-extern unsigned int ScanHash_4WaySSE2(char* pmidstate, char* pblock, char* phash1, char* phash, unsigned int& nHashesDone);
-
-
 
 class COrphan
 {
@@ -3546,9 +3478,6 @@ void BitcoinMiner()
 {
     printf("BitcoinMiner started\n");
     SetThreadPriority(THREAD_PRIORITY_LOWEST);
-    bool f4WaySSE2 = Detect128BitSSE2();
-    if (mapArgs.count("-4way"))
-        f4WaySSE2 = GetBoolArg("-4way");
 
     // Each thread has its own key and counter
     CReserveKey reservekey;
@@ -3610,14 +3539,9 @@ void BitcoinMiner()
             unsigned int nHashesDone = 0;
             unsigned int nNonceFound;
 
-#ifdef FOURWAYSSE2
-            if (f4WaySSE2)
-                // tcatm's 4-way 128-bit SSE2 SHA-256
-                nNonceFound = ScanHash_4WaySSE2(pmidstate, pdata + 64, phash1, (char*)&hash, nHashesDone);
-            else
-#endif
-                // Crypto++ SHA-256
-                nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1, (char*)&hash, nHashesDone);
+            // Crypto++ SHA-256
+            nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1,
+                                            (char*)&hash, nHashesDone);
 
             // Check if something found
             if (nNonceFound != -1)
index 355ef53..8ff1051 100644 (file)
@@ -1028,7 +1028,7 @@ public:
             if (!ptx->IsFinal())
                 return false;
             if (ptx->GetDepthInMainChain() >= 1)
-                return true;
+                continue;
             if (!ptx->IsFromMe())
                 return false;
 
index 61b925e..4f2da37 100644 (file)
@@ -32,7 +32,8 @@ LIBS+= \
  -Wl,-Bdynamic \
    -l gthread-2.0 \
    -l z \
-   -l dl
+   -l dl \
+   -l pthread
 
 
 DEBUGFLAGS=-g -D__WXDEBUG__
@@ -62,17 +63,14 @@ obj/%.o: %.cpp $(HEADERS)
 cryptopp/obj/%.o: cryptopp/%.cpp
        $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
 
-obj/sha256.o: sha256.cpp
-       $(CXX) -c $(CXXFLAGS) -msse2 -O3 -march=amdfam10 -o $@ $<
-
-bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha256.o
+bitcoin: $(OBJS) obj/ui.o obj/uibase.o
        $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
 
 
 obj/nogui/%.o: %.cpp $(HEADERS)
        $(CXX) -c $(CXXFLAGS) -o $@ $<
 
-bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha256.o
+bitcoind: $(OBJS:obj/%=obj/nogui/%)
        $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
 
 
index 90e7f15..d6a92b3 100644 (file)
@@ -1083,8 +1083,8 @@ Value listtransactions(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() > 2)
         throw runtime_error(
-            "listtransactions [account] [count=10]\n"
-            "Returns up to [count] most recent transactions for account <account>.");
+            "listtransactions [account] [count=10] [from=0]\n"
+            "Returns up to [count] most recent transactions skipping the first [from] transactions for account [account].");
 
     string strAccount = "*";
     if (params.size() > 0)
@@ -1092,6 +1092,9 @@ Value listtransactions(const Array& params, bool fHelp)
     int nCount = 10;
     if (params.size() > 1)
         nCount = params[1].get_int();
+    int nFrom = 0;
+    if (params.size() > 2)
+        nFrom = params[2].get_int();
 
     Array ret;
     CWalletDB walletdb;
@@ -1116,7 +1119,8 @@ Value listtransactions(const Array& params, bool fHelp)
         }
 
         // Now: iterate backwards until we have nCount items to return:
-        for (TxItems::reverse_iterator it = txByTime.rbegin(); it != txByTime.rend(); ++it)
+        TxItems::reverse_iterator it = txByTime.rbegin();
+        for (std::advance(it, nFrom); it != txByTime.rend(); ++it)
         {
             CWalletTx *const pwtx = (*it).second.first;
             if (pwtx != 0)
@@ -1570,10 +1574,11 @@ int ReadHTTPHeader(std::basic_istream<char>& stream, map<string, string>& mapHea
         {
             string strHeader = str.substr(0, nColon);
             boost::trim(strHeader);
+            boost::to_lower(strHeader);
             string strValue = str.substr(nColon+1);
             boost::trim(strValue);
             mapHeadersRet[strHeader] = strValue;
-            if (strHeader == "Content-Length")
+            if (strHeader == "content-length")
                 nLen = atoi(strValue.c_str());
         }
     }
@@ -1643,7 +1648,7 @@ string DecodeBase64(string s)
 
 bool HTTPAuthorized(map<string, string>& mapHeaders)
 {
-    string strAuth = mapHeaders["Authorization"];
+    string strAuth = mapHeaders["authorization"];
     if (strAuth.substr(0,6) != "Basic ")
         return false;
     string strUserPass64 = strAuth.substr(6); boost::trim(strUserPass64);
@@ -1872,7 +1877,7 @@ void ThreadRPCServer2(void* parg)
         }
 
         // Check authorization
-        if (mapHeaders.count("Authorization") == 0)
+        if (mapHeaders.count("authorization") == 0)
         {
             stream << HTTPReply(401, "") << std::flush;
             continue;
@@ -2087,6 +2092,7 @@ int CommandLineRPC(int argc, char *argv[])
         if (strMethod == "sendfrom"               && n > 2) ConvertTo<double>(params[2]);
         if (strMethod == "sendfrom"               && n > 3) ConvertTo<boost::int64_t>(params[3]);
         if (strMethod == "listtransactions"       && n > 1) ConvertTo<boost::int64_t>(params[1]);
+        if (strMethod == "listtransactions"       && n > 2) ConvertTo<boost::int64_t>(params[2]);
         if (strMethod == "listaccounts"           && n > 0) ConvertTo<boost::int64_t>(params[0]);
         if (strMethod == "sendmany"               && n > 1)
         {
index 383c987..ee39c07 100644 (file)
@@ -25,7 +25,7 @@ class CDataStream;
 class CAutoFile;
 static const unsigned int MAX_SIZE = 0x02000000;
 
-static const int VERSION = 32100;
+static const int VERSION = 32200;
 static const char* pszSubVer = "";
 static const bool VERSION_IS_BETA = true;
 
diff --git a/src/sha256.cpp b/src/sha256.cpp
deleted file mode 100644 (file)
index ca116bd..0000000
+++ /dev/null
@@ -1,475 +0,0 @@
-// Copyright (c) 2010 Nils Schneider
-// Distributed under the MIT/X11 software license, see the accompanying
-// file license.txt or http://www.opensource.org/licenses/mit-license.php.
-
-// 4-way 128-bit SSE2 SHA-256
-
-#ifdef FOURWAYSSE2
-
-#include <string.h>
-#include <assert.h>
-
-#include <xmmintrin.h>
-#include <stdint.h>
-#include <stdio.h>
-
-#define NPAR 32
-
-extern void DoubleBlockSHA256(const void* pin, void* pout, const void* pinit, unsigned int hash[8][NPAR], const void* init2);
-
-static const unsigned int sha256_consts[] = {
-    0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, /*  0 */
-    0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
-    0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, /*  8 */
-    0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
-    0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, /* 16 */
-    0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
-    0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, /* 24 */
-    0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
-    0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, /* 32 */
-    0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
-    0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, /* 40 */
-    0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
-    0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, /* 48 */
-    0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
-    0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, /* 56 */
-    0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
-};
-
-
-static inline __m128i Ch(const __m128i b, const __m128i c, const __m128i d) {
-    return (b & c) ^ (~b & d);
-}
-
-static inline __m128i Maj(const __m128i b, const __m128i c, const __m128i d) {
-    return (b & c) ^ (b & d) ^ (c & d);
-}
-
-static inline __m128i ROTR(__m128i x, const int n) {
-    return _mm_srli_epi32(x, n) | _mm_slli_epi32(x, 32 - n);
-}
-
-static inline __m128i SHR(__m128i x, const int n) {
-    return _mm_srli_epi32(x, n);
-}
-
-/* SHA256 Functions */
-#define BIGSIGMA0_256(x)    (ROTR((x), 2) ^ ROTR((x), 13) ^ ROTR((x), 22))
-#define BIGSIGMA1_256(x)    (ROTR((x), 6) ^ ROTR((x), 11) ^ ROTR((x), 25))
-#define SIGMA0_256(x)       (ROTR((x), 7) ^ ROTR((x), 18) ^ SHR((x), 3))
-#define SIGMA1_256(x)       (ROTR((x), 17) ^ ROTR((x), 19) ^ SHR((x), 10))
-
-static inline unsigned int store32(const __m128i x, int i) {
-    union { unsigned int ret[4]; __m128i x; } box;
-    box.x = x;
-    return box.ret[i];
-}
-
-static inline void store_epi32(const __m128i x, unsigned int *x0, unsigned int *x1, unsigned int *x2, unsigned int *x3) {
-    union { unsigned int ret[4]; __m128i x; } box;
-    box.x = x;
-    *x0 = box.ret[3]; *x1 = box.ret[2]; *x2 = box.ret[1]; *x3 = box.ret[0];
-}
-
-#define add4(x0, x1, x2, x3) _mm_add_epi32(_mm_add_epi32(_mm_add_epi32(x0, x1), x2), x3)
-#define add5(x0, x1, x2, x3, x4) _mm_add_epi32(add4(x0, x1, x2, x3), x4)
-
-#define SHA256ROUND(a, b, c, d, e, f, g, h, i, w)                       \
-    T1 = add5(h, BIGSIGMA1_256(e), Ch(e, f, g), _mm_set1_epi32(sha256_consts[i]), w);   \
-d = _mm_add_epi32(d, T1);                                           \
-h = _mm_add_epi32(T1, _mm_add_epi32(BIGSIGMA0_256(a), Maj(a, b, c)));
-
-static inline void dumpreg(__m128i x, char *msg) {
-    union { unsigned int ret[4]; __m128i x; } box;
-    box.x = x ;
-    printf("%s %08x %08x %08x %08x\n", msg, box.ret[0], box.ret[1], box.ret[2], box.ret[3]);
-}
-
-#if 1
-#define dumpstate(i) printf("%s: %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", \
-        __func__, store32(w0, i), store32(a, i), store32(b, i), store32(c, i), store32(d, i), store32(e, i), store32(f, i), store32(g, i), store32(h, i));
-#else
-#define dumpstate()
-#endif
-
-// Align by increasing pointer, must have extra space at end of buffer
-template <size_t nBytes, typename T>
-T* alignup(T* p)
-{
-    union
-    {
-        T* ptr;
-        size_t n;
-    } u;
-    u.ptr = p;
-    u.n = (u.n + (nBytes-1)) & ~(nBytes-1);
-    return u.ptr;
-}
-
-static const unsigned int pSHA256InitState[8] =
-{0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
-
-
-unsigned int ScanHash_4WaySSE2(char* pmidstate, char* pdata, char* phash1, char* phash, unsigned int& nHashesDone)
-{
-    unsigned int& nNonce = *(unsigned int*)(pdata + 12);
-    for (;;)
-    {
-        nNonce += NPAR;
-        unsigned int thashbuf[9][NPAR];
-        unsigned int (&thash)[9][NPAR] = *alignup<16>(&thashbuf);
-        DoubleBlockSHA256(pdata, phash1, pmidstate, thash, pSHA256InitState);
-
-        for (int j = 0; j < NPAR; j++)
-        {
-            if (thash[7][j] == 0)
-            {
-                for (int i = 0; i < 32/4; i++)
-                    ((unsigned int*)phash)[i] = thash[i][j];
-                return nNonce + j;
-            }
-        }
-
-        if ((nNonce & 0xffff) == 0)
-        {
-            nHashesDone = 0xffff+1;
-            return -1;
-        }
-    }
-}
-
-
-void DoubleBlockSHA256(const void* pin, void* pad, const void *pre, unsigned int thash[9][NPAR], const void *init)
-{
-    unsigned int* In = (unsigned int*)pin;
-    unsigned int* Pad = (unsigned int*)pad;
-    unsigned int* hPre = (unsigned int*)pre;
-    unsigned int* hInit = (unsigned int*)init;
-    unsigned int i, j, k;
-
-    /* vectors used in calculation */
-    __m128i w0, w1, w2, w3, w4, w5, w6, w7;
-    __m128i w8, w9, w10, w11, w12, w13, w14, w15;
-    __m128i T1;
-    __m128i a, b, c, d, e, f, g, h;
-    __m128i nonce;
-
-    /* nonce offset for vector */
-    __m128i offset = _mm_set_epi32(0x00000003, 0x00000002, 0x00000001, 0x00000000);
-
-
-    for(k = 0; k<NPAR; k+=4) {
-        w0 = _mm_set1_epi32(In[0]);
-        w1 = _mm_set1_epi32(In[1]);
-        w2 = _mm_set1_epi32(In[2]);
-        //w3 = _mm_set1_epi32(In[3]); nonce will be later hacked into the hash
-        w4 = _mm_set1_epi32(In[4]);
-        w5 = _mm_set1_epi32(In[5]);
-        w6 = _mm_set1_epi32(In[6]);
-        w7 = _mm_set1_epi32(In[7]);
-        w8 = _mm_set1_epi32(In[8]);
-        w9 = _mm_set1_epi32(In[9]);
-        w10 = _mm_set1_epi32(In[10]);
-        w11 = _mm_set1_epi32(In[11]);
-        w12 = _mm_set1_epi32(In[12]);
-        w13 = _mm_set1_epi32(In[13]);
-        w14 = _mm_set1_epi32(In[14]);
-        w15 = _mm_set1_epi32(In[15]);
-
-        /* hack nonce into lowest byte of w3 */
-        nonce = _mm_set1_epi32(In[3]);
-        nonce = _mm_add_epi32(nonce, offset);
-        nonce = _mm_add_epi32(nonce, _mm_set1_epi32(k));
-        w3 = nonce;
-
-        a = _mm_set1_epi32(hPre[0]);
-        b = _mm_set1_epi32(hPre[1]);
-        c = _mm_set1_epi32(hPre[2]);
-        d = _mm_set1_epi32(hPre[3]);
-        e = _mm_set1_epi32(hPre[4]);
-        f = _mm_set1_epi32(hPre[5]);
-        g = _mm_set1_epi32(hPre[6]);
-        h = _mm_set1_epi32(hPre[7]);
-
-        SHA256ROUND(a, b, c, d, e, f, g, h, 0, w0);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 1, w1);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 2, w2);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 3, w3);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 4, w4);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 5, w5);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 6, w6);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 7, w7);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 8, w8);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 9, w9);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 10, w10);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 11, w11);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 12, w12);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 13, w13);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 14, w14);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 15, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 16, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 17, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 18, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 19, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 20, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 21, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 22, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 23, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 24, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 25, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 26, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 27, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 28, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 29, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 30, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 31, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 32, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 33, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 34, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 35, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 36, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 37, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 38, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 39, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 40, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 41, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 42, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 43, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 44, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 45, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 46, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 47, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 48, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 49, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 50, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 51, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 52, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 53, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 54, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 55, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 56, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 57, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 58, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 59, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 60, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 61, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 62, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 63, w15);
-
-#define store_load(x, i, dest) \
-        T1 = _mm_set1_epi32((hPre)[i]); \
-        dest = _mm_add_epi32(T1, x);
-
-        store_load(a, 0, w0);
-        store_load(b, 1, w1);
-        store_load(c, 2, w2);
-        store_load(d, 3, w3);
-        store_load(e, 4, w4);
-        store_load(f, 5, w5);
-        store_load(g, 6, w6);
-        store_load(h, 7, w7);
-
-        w8 = _mm_set1_epi32(Pad[8]);
-        w9 = _mm_set1_epi32(Pad[9]);
-        w10 = _mm_set1_epi32(Pad[10]);
-        w11 = _mm_set1_epi32(Pad[11]);
-        w12 = _mm_set1_epi32(Pad[12]);
-        w13 = _mm_set1_epi32(Pad[13]);
-        w14 = _mm_set1_epi32(Pad[14]);
-        w15 = _mm_set1_epi32(Pad[15]);
-
-        a = _mm_set1_epi32(hInit[0]);
-        b = _mm_set1_epi32(hInit[1]);
-        c = _mm_set1_epi32(hInit[2]);
-        d = _mm_set1_epi32(hInit[3]);
-        e = _mm_set1_epi32(hInit[4]);
-        f = _mm_set1_epi32(hInit[5]);
-        g = _mm_set1_epi32(hInit[6]);
-        h = _mm_set1_epi32(hInit[7]);
-
-        SHA256ROUND(a, b, c, d, e, f, g, h, 0, w0);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 1, w1);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 2, w2);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 3, w3);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 4, w4);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 5, w5);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 6, w6);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 7, w7);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 8, w8);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 9, w9);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 10, w10);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 11, w11);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 12, w12);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 13, w13);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 14, w14);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 15, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 16, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 17, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 18, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 19, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 20, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 21, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 22, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 23, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 24, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 25, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 26, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 27, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 28, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 29, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 30, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 31, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 32, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 33, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 34, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 35, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 36, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 37, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 38, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 39, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 40, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 41, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 42, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 43, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 44, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 45, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 46, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 47, w15);
-
-        w0 = add4(SIGMA1_256(w14), w9, SIGMA0_256(w1), w0);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 48, w0);
-        w1 = add4(SIGMA1_256(w15), w10, SIGMA0_256(w2), w1);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 49, w1);
-        w2 = add4(SIGMA1_256(w0), w11, SIGMA0_256(w3), w2);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 50, w2);
-        w3 = add4(SIGMA1_256(w1), w12, SIGMA0_256(w4), w3);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 51, w3);
-        w4 = add4(SIGMA1_256(w2), w13, SIGMA0_256(w5), w4);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 52, w4);
-        w5 = add4(SIGMA1_256(w3), w14, SIGMA0_256(w6), w5);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 53, w5);
-        w6 = add4(SIGMA1_256(w4), w15, SIGMA0_256(w7), w6);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 54, w6);
-        w7 = add4(SIGMA1_256(w5), w0, SIGMA0_256(w8), w7);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 55, w7);
-        w8 = add4(SIGMA1_256(w6), w1, SIGMA0_256(w9), w8);
-        SHA256ROUND(a, b, c, d, e, f, g, h, 56, w8);
-        w9 = add4(SIGMA1_256(w7), w2, SIGMA0_256(w10), w9);
-        SHA256ROUND(h, a, b, c, d, e, f, g, 57, w9);
-        w10 = add4(SIGMA1_256(w8), w3, SIGMA0_256(w11), w10);
-        SHA256ROUND(g, h, a, b, c, d, e, f, 58, w10);
-        w11 = add4(SIGMA1_256(w9), w4, SIGMA0_256(w12), w11);
-        SHA256ROUND(f, g, h, a, b, c, d, e, 59, w11);
-        w12 = add4(SIGMA1_256(w10), w5, SIGMA0_256(w13), w12);
-        SHA256ROUND(e, f, g, h, a, b, c, d, 60, w12);
-        w13 = add4(SIGMA1_256(w11), w6, SIGMA0_256(w14), w13);
-        SHA256ROUND(d, e, f, g, h, a, b, c, 61, w13);
-        w14 = add4(SIGMA1_256(w12), w7, SIGMA0_256(w15), w14);
-        SHA256ROUND(c, d, e, f, g, h, a, b, 62, w14);
-        w15 = add4(SIGMA1_256(w13), w8, SIGMA0_256(w0), w15);
-        SHA256ROUND(b, c, d, e, f, g, h, a, 63, w15);
-
-        /* store resulsts directly in thash */
-#define store_2(x,i)  \
-        w0 = _mm_set1_epi32(hInit[i]); \
-        *(__m128i *)&(thash)[i][0+k] = _mm_add_epi32(w0, x);
-
-        store_2(a, 0);
-        store_2(b, 1);
-        store_2(c, 2);
-        store_2(d, 3);
-        store_2(e, 4);
-        store_2(f, 5);
-        store_2(g, 6);
-        store_2(h, 7);
-        *(__m128i *)&(thash)[8][0+k] = nonce;
-    }
-
-}
-
-#endif // FOURWAYSSE2
index 2277da6..f2bdd49 100644 (file)
@@ -1094,12 +1094,6 @@ void CMainFrame::OnMenuFileExit(wxCommandEvent& event)
     Close(true);
 }
 
-void CMainFrame::OnMenuOptionsGenerate(wxCommandEvent& event)
-{
-    // Options->Generate Coins
-    GenerateBitcoins(event.IsChecked());
-}
-
 void CMainFrame::OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event)
 {
     event.Check(fGenerateBitcoins);
@@ -1655,13 +1649,6 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
 
     // Init values
     m_textCtrlTransactionFee->SetValue(FormatMoney(nTransactionFee));
-    m_checkBoxLimitProcessors->SetValue(fLimitProcessors);
-    m_spinCtrlLimitProcessors->Enable(fLimitProcessors);
-    m_spinCtrlLimitProcessors->SetValue(nLimitProcessors);
-    int nProcessors = wxThread::GetCPUCount();
-    if (nProcessors < 1)
-        nProcessors = 999;
-    m_spinCtrlLimitProcessors->SetRange(1, nProcessors);
     m_checkBoxStartOnSystemStartup->SetValue(fTmpStartOnSystemStartup = GetStartOnSystemStartup());
     m_checkBoxMinimizeToTray->SetValue(fMinimizeToTray);
     m_checkBoxMinimizeOnClose->SetValue(fMinimizeOnClose);
@@ -1702,11 +1689,6 @@ void COptionsDialog::OnKillFocusTransactionFee(wxFocusEvent& event)
     m_textCtrlTransactionFee->SetValue(FormatMoney(nTmp));
 }
 
-void COptionsDialog::OnCheckBoxLimitProcessors(wxCommandEvent& event)
-{
-    m_spinCtrlLimitProcessors->Enable(event.IsChecked());
-}
-
 void COptionsDialog::OnCheckBoxUseProxy(wxCommandEvent& event)
 {
     m_textCtrlProxyIP->Enable(event.IsChecked());
@@ -1755,20 +1737,6 @@ void COptionsDialog::OnButtonApply(wxCommandEvent& event)
     if (ParseMoney(m_textCtrlTransactionFee->GetValue(), nTransactionFee) && nTransactionFee != nPrevTransactionFee)
         walletdb.WriteSetting("nTransactionFee", nTransactionFee);
 
-    int nPrevMaxProc = (fLimitProcessors ? nLimitProcessors : INT_MAX);
-    if (fLimitProcessors != m_checkBoxLimitProcessors->GetValue())
-    {
-        fLimitProcessors = m_checkBoxLimitProcessors->GetValue();
-        walletdb.WriteSetting("fLimitProcessors", fLimitProcessors);
-    }
-    if (nLimitProcessors != m_spinCtrlLimitProcessors->GetValue())
-    {
-        nLimitProcessors = m_spinCtrlLimitProcessors->GetValue();
-        walletdb.WriteSetting("nLimitProcessors", nLimitProcessors);
-    }
-    if (fGenerateBitcoins && (fLimitProcessors ? nLimitProcessors : INT_MAX) > nPrevMaxProc)
-        GenerateBitcoins(fGenerateBitcoins);
-
     if (fTmpStartOnSystemStartup != m_checkBoxStartOnSystemStartup->GetValue())
     {
         fTmpStartOnSystemStartup = m_checkBoxStartOnSystemStartup->GetValue();
@@ -1859,6 +1827,7 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi
     m_bitmapCheckMark->Show(false);
     fEnabledPrev = true;
     m_textCtrlAddress->SetFocus();
+    
     //// todo: should add a display of your balance for convenience
 #ifndef __WXMSW__
     wxFont fontTmp = m_staticTextInstructions->GetFont();
@@ -1867,7 +1836,7 @@ CSendDialog::CSendDialog(wxWindow* parent, const wxString& strAddress) : CSendDi
     m_staticTextInstructions->SetFont(fontTmp);
     SetSize(725, 180);
 #endif
-
+    
     // Set Icon
     wxIcon iconSend;
     iconSend.CopyFromBitmap(wxBitmap(send16noshadow_xpm));
@@ -1960,6 +1929,7 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
                 {
                     wxMessageBox(strError + "  ", _("Sending..."));
                     EndModal(false);
+                    return;
                 }
            }
         }
@@ -2605,6 +2575,7 @@ void CAddressBookDialog::OnClose(wxCloseEvent& event)
 enum
 {
     ID_TASKBAR_RESTORE = 10001,
+    ID_TASKBAR_SEND,
     ID_TASKBAR_OPTIONS,
     ID_TASKBAR_GENERATE,
     ID_TASKBAR_EXIT,
@@ -2613,8 +2584,8 @@ enum
 BEGIN_EVENT_TABLE(CMyTaskBarIcon, wxTaskBarIcon)
     EVT_TASKBAR_LEFT_DCLICK(CMyTaskBarIcon::OnLeftButtonDClick)
     EVT_MENU(ID_TASKBAR_RESTORE, CMyTaskBarIcon::OnMenuRestore)
+    EVT_MENU(ID_TASKBAR_SEND, CMyTaskBarIcon::OnMenuSend)
     EVT_MENU(ID_TASKBAR_OPTIONS, CMyTaskBarIcon::OnMenuOptions)
-    EVT_MENU(ID_TASKBAR_GENERATE, CMyTaskBarIcon::OnMenuGenerate)
     EVT_UPDATE_UI(ID_TASKBAR_GENERATE, CMyTaskBarIcon::OnUpdateUIGenerate)
     EVT_MENU(ID_TASKBAR_EXIT, CMyTaskBarIcon::OnMenuExit)
 END_EVENT_TABLE()
@@ -2665,6 +2636,13 @@ void CMyTaskBarIcon::OnMenuRestore(wxCommandEvent& event)
     Restore();
 }
 
+void CMyTaskBarIcon::OnMenuSend(wxCommandEvent& event)
+{
+    // Taskbar: Send
+    CSendDialog dialog(pframeMain);
+    dialog.ShowModal();
+}
+
 void CMyTaskBarIcon::OnMenuOptions(wxCommandEvent& event)
 {
     // Since it's modal, get the main window to do it
@@ -2681,11 +2659,6 @@ void CMyTaskBarIcon::Restore()
     pframeMain->Raise();
 }
 
-void CMyTaskBarIcon::OnMenuGenerate(wxCommandEvent& event)
-{
-    GenerateBitcoins(event.IsChecked());
-}
-
 void CMyTaskBarIcon::OnUpdateUIGenerate(wxUpdateUIEvent& event)
 {
     event.Check(fGenerateBitcoins);
@@ -2706,8 +2679,8 @@ wxMenu* CMyTaskBarIcon::CreatePopupMenu()
 {
     wxMenu* pmenu = new wxMenu;
     pmenu->Append(ID_TASKBAR_RESTORE, _("&Open Bitcoin"));
+    pmenu->Append(ID_TASKBAR_SEND, _("&Send Bitcoins"));
     pmenu->Append(ID_TASKBAR_OPTIONS, _("O&ptions..."));
-    pmenu->AppendCheckItem(ID_TASKBAR_GENERATE, _("&Generate Coins"))->Check(fGenerateBitcoins);
 #ifndef __WXMAC_OSX__ // Mac has built-in quit menu
     pmenu->AppendSeparator();
     pmenu->Append(ID_TASKBAR_EXIT, _("E&xit"));
@@ -2839,9 +2812,6 @@ bool CMyApp::OnInit()
     extern int g_isPainting;
     g_isPainting = 10000;
 #endif
-#ifdef GUI
-    wxImage::AddHandler(new wxPNGHandler);
-#endif
 #if defined(__WXMSW__ ) || defined(__WXMAC_OSX__)
     SetAppName("Bitcoin");
 #else
index af97d5a..aff1f1e 100644 (file)
--- a/src/ui.h
+++ b/src/ui.h
@@ -52,7 +52,6 @@ protected:
     void OnPaint(wxPaintEvent& event);
     void OnPaintListCtrl(wxPaintEvent& event);
     void OnMenuFileExit(wxCommandEvent& event);
-    void OnMenuOptionsGenerate(wxCommandEvent& event);
     void OnUpdateUIOptionsGenerate(wxUpdateUIEvent& event);
     void OnMenuOptionsChangeYourAddress(wxCommandEvent& event);
     void OnMenuOptionsOptions(wxCommandEvent& event);
@@ -127,7 +126,6 @@ protected:
     // Event handlers
     void OnListBox(wxCommandEvent& event);
     void OnKillFocusTransactionFee(wxFocusEvent& event);
-    void OnCheckBoxLimitProcessors(wxCommandEvent& event);
     void OnCheckBoxUseProxy(wxCommandEvent& event);
     void OnKillFocusProxy(wxFocusEvent& event);
 
@@ -323,6 +321,7 @@ protected:
     // Event handlers
     void OnLeftButtonDClick(wxTaskBarIconEvent& event);
     void OnMenuRestore(wxCommandEvent& event);
+    void OnMenuSend(wxCommandEvent& event);
     void OnMenuOptions(wxCommandEvent& event);
     void OnUpdateUIGenerate(wxUpdateUIEvent& event);
     void OnMenuGenerate(wxCommandEvent& event);
index 41be5d7..1b901a1 100644 (file)
@@ -28,10 +28,6 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString&
        m_menubar->Append( m_menuFile, _("&File") );
        
        m_menuOptions = new wxMenu();
-       wxMenuItem* m_menuOptionsGenerateBitcoins;
-       m_menuOptionsGenerateBitcoins = new wxMenuItem( m_menuOptions, wxID_OPTIONSGENERATEBITCOINS, wxString( _("&Generate Coins") ) , wxEmptyString, wxITEM_CHECK );
-       m_menuOptions->Append( m_menuOptionsGenerateBitcoins );
-       
        wxMenuItem* m_menuOptionsChangeYourAddress;
        m_menuOptionsChangeYourAddress = new wxMenuItem( m_menuOptions, wxID_ANY, wxString( _("&Your Receiving Addresses...") ) , wxEmptyString, wxITEM_NORMAL );
        m_menuOptions->Append( m_menuOptionsChangeYourAddress );
@@ -190,8 +186,6 @@ CMainFrameBase::CMainFrameBase( wxWindow* parent, wxWindowID id, const wxString&
        this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
        this->Connect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) );
        this->Connect( m_menuFileExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) );
-       this->Connect( m_menuOptionsGenerateBitcoins->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsGenerate ) );
-       this->Connect( m_menuOptionsGenerateBitcoins->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIOptionsGenerate ) );
        this->Connect( m_menuOptionsChangeYourAddress->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) );
        this->Connect( m_menuOptionsOptions->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsOptions ) );
        this->Connect( m_menuHelpAbout->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuHelpAbout ) );
@@ -250,8 +244,6 @@ CMainFrameBase::~CMainFrameBase()
        this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CMainFrameBase::OnMouseEvents ) );
        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( CMainFrameBase::OnPaint ) );
        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuFileExit ) );
-       this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsGenerate ) );
-       this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( CMainFrameBase::OnUpdateUIOptionsGenerate ) );
        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsChangeYourAddress ) );
        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuOptionsOptions ) );
        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( CMainFrameBase::OnMenuHelpAbout ) );
@@ -350,21 +342,6 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w
        
        bSizer69->Add( 0, 16, 0, wxEXPAND, 5 );
        
-       wxBoxSizer* bSizer71;
-       bSizer71 = new wxBoxSizer( wxHORIZONTAL );
-       
-       m_checkBoxLimitProcessors = new wxCheckBox( m_panelMain, wxID_ANY, _("&Limit coin generation to"), wxDefaultPosition, wxDefaultSize, 0 );
-       bSizer71->Add( m_checkBoxLimitProcessors, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       m_spinCtrlLimitProcessors = new wxSpinCtrl( m_panelMain, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 48,-1 ), wxSP_ARROW_KEYS, 1, 999, 1 );
-       bSizer71->Add( m_spinCtrlLimitProcessors, 0, wxALIGN_CENTER_VERTICAL, 5 );
-       
-       m_staticText35 = new wxStaticText( m_panelMain, wxID_ANY, _("processors"), wxDefaultPosition, wxDefaultSize, 0 );
-       m_staticText35->Wrap( -1 );
-       bSizer71->Add( m_staticText35, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
-       
-       bSizer69->Add( bSizer71, 0, 0, 5 );
-       
        m_checkBoxStartOnSystemStartup = new wxCheckBox( m_panelMain, wxID_ANY, _("&Start Bitcoin on system startup"), wxDefaultPosition, wxDefaultSize, 0 );
        bSizer69->Add( m_checkBoxStartOnSystemStartup, 0, wxALL, 5 );
        
@@ -479,7 +456,6 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w
        
        // Connect Events
        m_listBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( COptionsDialogBase::OnListBox ), NULL, this );
-       m_checkBoxLimitProcessors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxLimitProcessors ), NULL, this );
        m_checkBoxMinimizeToTray->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxMinimizeToTray ), NULL, this );
        m_checkBoxUseProxy->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxUseProxy ), NULL, this );
        m_textCtrlProxyIP->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
@@ -494,7 +470,6 @@ COptionsDialogBase::~COptionsDialogBase()
 {
        // Disconnect Events
        m_listBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( COptionsDialogBase::OnListBox ), NULL, this );
-       m_checkBoxLimitProcessors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxLimitProcessors ), NULL, this );
        m_checkBoxMinimizeToTray->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxMinimizeToTray ), NULL, this );
        m_checkBoxUseProxy->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( COptionsDialogBase::OnCheckBoxUseProxy ), NULL, this );
        m_textCtrlProxyIP->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( COptionsDialogBase::OnKillFocusProxy ), NULL, this );
index c5da8f5..78f3d1b 100644 (file)
 #include <wx/dialog.h>
 #include <wx/listbox.h>
 #include <wx/checkbox.h>
-#include <wx/spinctrl.h>
 #include <wx/scrolwin.h>
 #include <wx/statbmp.h>
 
 ///////////////////////////////////////////////////////////////////////////
 
 #define wxID_MAINFRAME 1000
-#define wxID_OPTIONSGENERATEBITCOINS 1001
-#define wxID_BUTTONSEND 1002
-#define wxID_BUTTONRECEIVE 1003
-#define wxID_TEXTCTRLADDRESS 1004
-#define wxID_BUTTONNEW 1005
-#define wxID_BUTTONCOPY 1006
-#define wxID_PROXYIP 1007
-#define wxID_PROXYPORT 1008
-#define wxID_TRANSACTIONFEE 1009
-#define wxID_TEXTCTRLPAYTO 1010
-#define wxID_BUTTONPASTE 1011
-#define wxID_BUTTONADDRESSBOOK 1012
-#define wxID_TEXTCTRLAMOUNT 1013
-#define wxID_CHOICETRANSFERTYPE 1014
-#define wxID_LISTCTRL 1015
-#define wxID_BUTTONRENAME 1016
-#define wxID_PANELSENDING 1017
-#define wxID_LISTCTRLSENDING 1018
-#define wxID_PANELRECEIVING 1019
-#define wxID_LISTCTRLRECEIVING 1020
-#define wxID_BUTTONDELETE 1021
-#define wxID_BUTTONEDIT 1022
-#define wxID_TEXTCTRL 1023
+#define wxID_BUTTONSEND 1001
+#define wxID_BUTTONRECEIVE 1002
+#define wxID_TEXTCTRLADDRESS 1003
+#define wxID_BUTTONNEW 1004
+#define wxID_BUTTONCOPY 1005
+#define wxID_PROXYIP 1006
+#define wxID_PROXYPORT 1007
+#define wxID_TRANSACTIONFEE 1008
+#define wxID_TEXTCTRLPAYTO 1009
+#define wxID_BUTTONPASTE 1010
+#define wxID_BUTTONADDRESSBOOK 1011
+#define wxID_TEXTCTRLAMOUNT 1012
+#define wxID_CHOICETRANSFERTYPE 1013
+#define wxID_LISTCTRL 1014
+#define wxID_BUTTONRENAME 1015
+#define wxID_PANELSENDING 1016
+#define wxID_LISTCTRLSENDING 1017
+#define wxID_PANELRECEIVING 1018
+#define wxID_LISTCTRLRECEIVING 1019
+#define wxID_BUTTONDELETE 1020
+#define wxID_BUTTONEDIT 1021
+#define wxID_TEXTCTRL 1022
 
 ///////////////////////////////////////////////////////////////////////////////
 /// Class CMainFrameBase
@@ -99,8 +97,6 @@ class CMainFrameBase : public wxFrame
                virtual void OnMouseEvents( wxMouseEvent& event ) { event.Skip(); }
                virtual void OnPaint( wxPaintEvent& event ) { event.Skip(); }
                virtual void OnMenuFileExit( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OnMenuOptionsGenerate( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OnUpdateUIOptionsGenerate( wxUpdateUIEvent& event ) { event.Skip(); }
                virtual void OnMenuOptionsChangeYourAddress( wxCommandEvent& event ) { event.Skip(); }
                virtual void OnMenuOptionsOptions( wxCommandEvent& event ) { event.Skip(); }
                virtual void OnMenuHelpAbout( wxCommandEvent& event ) { event.Skip(); }
@@ -165,9 +161,6 @@ class COptionsDialogBase : public wxDialog
                wxScrolledWindow* m_scrolledWindow;
                wxPanel* m_panelMain;
                
-               wxCheckBox* m_checkBoxLimitProcessors;
-               wxSpinCtrl* m_spinCtrlLimitProcessors;
-               wxStaticText* m_staticText35;
                wxCheckBox* m_checkBoxStartOnSystemStartup;
                wxCheckBox* m_checkBoxMinimizeToTray;
                wxCheckBox* m_checkBoxUseUPnP;
@@ -192,7 +185,6 @@ class COptionsDialogBase : public wxDialog
                
                // Virtual event handlers, overide them in your derived class
                virtual void OnListBox( wxCommandEvent& event ) { event.Skip(); }
-               virtual void OnCheckBoxLimitProcessors( wxCommandEvent& event ) { event.Skip(); }
                virtual void OnCheckBoxMinimizeToTray( wxCommandEvent& event ) { event.Skip(); }
                virtual void OnCheckBoxUseProxy( wxCommandEvent& event ) { event.Skip(); }
                virtual void OnKillFocusProxy( wxFocusEvent& event ) { event.Skip(); }