aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-msw.txt25
-rw-r--r--build-osx.txt45
-rw-r--r--build-unix.txt18
-rw-r--r--db.cpp6
-rw-r--r--init.cpp44
-rw-r--r--locale/de/LC_MESSAGES/bitcoin.mobin16112 -> 16242 bytes
-rw-r--r--locale/de/LC_MESSAGES/bitcoin.po7
-rw-r--r--locale/es/LC_MESSAGES/bitcoin.mobin15034 -> 16064 bytes
-rw-r--r--locale/es/LC_MESSAGES/bitcoin.po31
-rw-r--r--locale/fr/LC_MESSAGES/bitcoin.mobin15765 -> 15859 bytes
-rw-r--r--locale/fr/LC_MESSAGES/bitcoin.po4
-rw-r--r--locale/it/LC_MESSAGES/bitcoin.mobin15639 -> 15725 bytes
-rw-r--r--locale/it/LC_MESSAGES/bitcoin.po6
-rw-r--r--locale/nl/LC_MESSAGES/bitcoin.mobin14942 -> 15598 bytes
-rw-r--r--locale/nl/LC_MESSAGES/bitcoin.po181
-rw-r--r--locale/pt/LC_MESSAGES/bitcoin.mobin15680 -> 15767 bytes
-rw-r--r--locale/pt/LC_MESSAGES/bitcoin.po5
-rw-r--r--locale/ru/LC_MESSAGES/bitcoin.mobin21624 -> 21763 bytes
-rw-r--r--locale/ru/LC_MESSAGES/bitcoin.po4
-rw-r--r--main.cpp44
-rw-r--r--main.h6
-rw-r--r--makefile.mingw13
-rw-r--r--makefile.osx7
-rw-r--r--makefile.unix15
-rw-r--r--net.cpp125
-rw-r--r--net.h1
-rw-r--r--rpc.cpp92
-rw-r--r--ui.cpp46
-rw-r--r--uibase.cpp5
-rw-r--r--uibase.h1
-rw-r--r--uiproject.fbp58
31 files changed, 581 insertions, 208 deletions
diff --git a/build-msw.txt b/build-msw.txt
index deba805d52..a28c7ef859 100644
--- a/build-msw.txt
+++ b/build-msw.txt
@@ -3,7 +3,8 @@ Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
-cryptographic software written by Eric Young (eay@cryptsoft.com).
+cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
+software written by Thomas Bernard.
WINDOWS BUILD NOTES
@@ -25,23 +26,26 @@ Dependencies
------------
Libraries you need to download separately and build:
- default path download
-wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/
-OpenSSL \openssl-1.0.0c-mgw http://www.openssl.org/source/
-Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
-Boost \boost-1.43.0-mgw http://www.boost.org/users/download/
+ default path download
+wxWidgets \wxwidgets-2.9.1-mgw http://www.wxwidgets.org/downloads/
+OpenSSL \openssl-1.0.0c-mgw http://www.openssl.org/source/
+Berkeley DB \db-4.7.25.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
+Boost \boost-1.43.0-mgw http://www.boost.org/users/download/
+miniupnpc \upnpc-exe-win32-20110215 http://miniupnp.tuxfamily.org/files/
Their licenses:
wxWidgets LGPL 2.1 with very liberal exceptions
OpenSSL Old BSD license with the problematic advertising requirement
Berkeley DB New BSD license with additional requirement that linked software must be free open source
Boost MIT-like license
+miniupnpc New (3-clause) BSD license
Versions used in this release:
wxWidgets 2.9.1
OpenSSL 1.0.0c
Berkeley DB 4.7.25.NC
Boost 1.43.0
+miniupnpc 1.5-20110215
Notes
@@ -90,6 +94,15 @@ Note:
building with boost 1.45.0 failed because of boost ticket 4614, 4258
builds fine with boost 1.43.0
+MiniUPnPc
+---------
+Building miniupnpc failed on Windows Server 2003, thus it is expected that a binary copy will be used.
+See http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=642
+UPnP support is optional, make with USE_UPNP= to disable it.
+
+Get upnpc-exe-win32-20110215.zip and unzip it to \upnpc-exe-win32-20110215
+Get miniupnpc-1.5.20110215.tar.gz and copy *.h to \upnpc-exe-win32-20110215\miniupnpc
+
Bitcoin
-------
DOS prompt:
diff --git a/build-osx.txt b/build-osx.txt
index 2f8b53321f..a67a3be2e8 100644
--- a/build-osx.txt
+++ b/build-osx.txt
@@ -3,7 +3,8 @@ Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
-cryptographic software written by Eric Young (eay@cryptsoft.com).
+cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
+software written by Thomas Bernard.
Mac OS X build instructions
@@ -108,11 +109,51 @@ file lib/libcrypto.a
output should look like this:
-ib/libcrypto.a: Mach-O universal binary with 2 architectures
+lib/libcrypto.a: Mach-O universal binary with 2 architectures
lib/libcrypto.a (for architecture i386): current ar archive random library
lib/libcrypto.a (for architecture x86_64): current ar archive random library
+miniupnpc
+---------
+
+The process for miniupnpc (optional) is similar to that of OpenSSL.
+
+Download from http://miniupnp.tuxfamily.org/files/.
+
+cd ~/bitcoin/deps
+tar xvf ~/Downloads/miniupnpc-1.5.tar
+mv miniupnpc-1.5 miniupnpc-1.5-x86_64
+tar xvf ~/Downloads/miniupnpc-1.5.tar
+mv miniupnpc-1.5 miniupnpc-1.5-i386
+# build x86_64 (64 bit intel) binary
+cd miniupnpc-1.5-x86_64
+export CFLAGS="-arch x86_64"
+export LDFLAGS="-arch x86_64"
+export PREFIX="/Users/macuser/bitcoin/deps"
+make && make install
+# build i386 (32 bit intel) binary
+cd miniupnpc-1.5-i386
+export CFLAGS="-arch i386"
+export LDFLAGS="-arch i386"
+export PREFIX="/Users/macuser/bitcoin/deps"
+make
+
+# combine the libs
+cd ~/bitcoin/deps
+lipo -arch i386 miniupnpc-1.5-i386/libminiupnpc.a -arch x86_64 miniupnpc-1.5-x86_64/libminiupnpc.a -o lib/libminiupnpc.a -create
+
+Verify your binaries
+
+file lib/libminiupnpc.a
+
+output should look like this:
+
+lib/libminiupnpc.a: Mach-O universal binary with 2 architectures
+lib/libminiupnpc.a (for architecture i386): current ar archive random library
+lib/libminiupnpc.a (for architecture x86_64): current ar archive random library
+
+
Berkeley DB
-----------
diff --git a/build-unix.txt b/build-unix.txt
index 27a4570665..b959f1a2d9 100644
--- a/build-unix.txt
+++ b/build-unix.txt
@@ -3,7 +3,8 @@ Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
-cryptographic software written by Eric Young (eay@cryptsoft.com).
+cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
+software written by Thomas Bernard.
UNIX BUILD NOTES
@@ -36,10 +37,15 @@ 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/.
+
Licenses of statically linked libraries:
wxWidgets LGPL 2.1 with very liberal exceptions
Berkeley DB New BSD license with additional requirement that linked software must be free open source
Boost MIT-like license
+miniupnpc New (3-clause) BSD license
Versions used in this release:
GCC 4.3.3
@@ -47,6 +53,7 @@ OpenSSL 0.9.8g
wxWidgets 2.9.0
Berkeley DB 4.7.25.NC
Boost 1.37
+miniupnpc 1.5
Notes
@@ -73,6 +80,15 @@ make install
ldconfig
+miniupnpc
+---------
+tar -xzvf miniupnpc-1.5.tar.gz
+cd miniupnpc-1.5
+make
+sudo su
+make install
+
+
Berkeley DB
-----------
You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files
diff --git a/db.cpp b/db.cpp
index aaa997be2e..28a8b71733 100644
--- a/db.cpp
+++ b/db.cpp
@@ -668,8 +668,8 @@ bool CWalletDB::LoadWallet()
#endif
//// todo: shouldn't we catch exceptions and try to recover and continue?
- CRITICAL_BLOCK(cs_mapKeys)
CRITICAL_BLOCK(cs_mapWallet)
+ CRITICAL_BLOCK(cs_mapKeys)
{
// Get cursor
Dbc* pcursor = GetCursor();
@@ -790,7 +790,7 @@ bool CWalletDB::LoadWallet()
if (strKey == "fMinimizeOnClose") ssValue >> fMinimizeOnClose;
if (strKey == "fUseProxy") ssValue >> fUseProxy;
if (strKey == "addrProxy") ssValue >> addrProxy;
-
+ if (fHaveUPnP && strKey == "fUseUPnP") ssValue >> fUseUPnP;
}
}
pcursor->close();
@@ -807,6 +807,8 @@ bool CWalletDB::LoadWallet()
printf("fMinimizeOnClose = %d\n", fMinimizeOnClose);
printf("fUseProxy = %d\n", fUseProxy);
printf("addrProxy = %s\n", addrProxy.ToString().c_str());
+ if (fHaveUPnP)
+ printf("fUseUPnP = %d\n", fUseUPnP);
// Upgrade
diff --git a/init.cpp b/init.cpp
index 8e58126693..effac288fc 100644
--- a/init.cpp
+++ b/init.cpp
@@ -78,7 +78,9 @@ int main(int argc, char* argv[])
fRet = AppInit(argc, argv);
if (fRet && fDaemon)
- pthread_exit((void*)0);
+ return 0;
+
+ return 1;
}
#endif
@@ -120,6 +122,8 @@ bool AppInit2(int argc, char* argv[])
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
sigaction(SIGTERM, &sa, NULL);
+ sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGHUP, &sa, NULL);
#endif
//
@@ -155,9 +159,18 @@ bool AppInit2(int argc, char* argv[])
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
" -connect=<ip> \t\t " + _("Connect only to the specified node\n") +
" -nolisten \t " + _("Don't accept connections from outside\n") +
+#ifdef USE_UPNP
+#if USE_UPNP
+ " -noupnp \t " + _("Don't attempt to use UPnP to map the listening port\n") +
+#else
+ " -upnp \t " + _("Attempt to use UPnP to map the listening port\n") +
+#endif
+#endif
" -paytxfee=<amt> \t " + _("Fee per KB to add to transactions you send\n") +
#ifdef GUI
" -server \t\t " + _("Accept command line and JSON-RPC commands\n") +
+#endif
+#ifndef __WXMSW__
" -daemon \t\t " + _("Run in the background as a daemon and accept commands\n") +
#endif
" -testnet \t\t " + _("Use the test network\n") +
@@ -194,17 +207,20 @@ bool AppInit2(int argc, char* argv[])
fDebug = GetBoolArg("-debug");
+#ifndef __WXMSW__
fDaemon = GetBoolArg("-daemon");
+#else
+ fDaemon = false;
+#endif
if (fDaemon)
fServer = true;
else
fServer = GetBoolArg("-server");
- /* force fServer and fDaemon when running without GUI */
+ /* force fServer when running without GUI */
#ifndef GUI
fServer = true;
- fDaemon = true;
#endif
fPrintToConsole = GetBoolArg("-printtoconsole");
@@ -224,7 +240,7 @@ bool AppInit2(int argc, char* argv[])
exit(ret);
}
-#ifndef GUI
+#ifndef __WXMSW__
if (fDaemon)
{
// Daemonize
@@ -236,6 +252,10 @@ bool AppInit2(int argc, char* argv[])
}
if (pid > 0)
return true;
+
+ pid_t sid = setsid();
+ if (sid < 0)
+ fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
}
#endif
@@ -443,6 +463,17 @@ bool AppInit2(int argc, char* argv[])
wxMessageBox(_("Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction."), "Bitcoin", wxOK | wxICON_EXCLAMATION);
}
+ if (fHaveUPnP)
+ {
+#if USE_UPNP
+ if (GetBoolArg("-noupnp"))
+ fUseUPnP = false;
+#else
+ if (GetBoolArg("-upnp"))
+ fUseUPnP = true;
+#endif
+ }
+
//
// Create the main window and start the node
//
@@ -467,5 +498,10 @@ bool AppInit2(int argc, char* argv[])
SetStartOnSystemStartup(true);
#endif
+#ifndef GUI
+ while (1)
+ Sleep(5000);
+#endif
+
return true;
}
diff --git a/locale/de/LC_MESSAGES/bitcoin.mo b/locale/de/LC_MESSAGES/bitcoin.mo
index eb0ca5ddf3..5d5ec90e23 100644
--- a/locale/de/LC_MESSAGES/bitcoin.mo
+++ b/locale/de/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/de/LC_MESSAGES/bitcoin.po b/locale/de/LC_MESSAGES/bitcoin.po
index 058a3ce9b6..33b32d17ee 100644
--- a/locale/de/LC_MESSAGES/bitcoin.po
+++ b/locale/de/LC_MESSAGES/bitcoin.po
@@ -1,9 +1,11 @@
# DataWraith <DataWraith@web.de>, 2010.
msgid ""
msgstr ""
+"Project-Id-Version: \n"
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
"PO-Revision-Date: 2010-06-03 13:11+0200\n"
"Last-Translator: DataWraith\n"
+"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -707,7 +709,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Copyright (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -718,7 +720,8 @@ msgstr ""
"\n"
"Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Nutzung im\n"
"OpenSSL Toolkit (http://www.openssl.org/) geschrieben wurde sowie\n"
-"kryptographische Software von Eric Young (eay@cryptsoft.com)."
+"kryptographische Software von Eric Young (eay@cryptsoft.com)\n"
+"und UPnP-Software, entwickelt von Thomas Bernard."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
diff --git a/locale/es/LC_MESSAGES/bitcoin.mo b/locale/es/LC_MESSAGES/bitcoin.mo
index f4e41a2cf7..234acbd011 100644
--- a/locale/es/LC_MESSAGES/bitcoin.mo
+++ b/locale/es/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/es/LC_MESSAGES/bitcoin.po b/locale/es/LC_MESSAGES/bitcoin.po
index 23c485b819..0617ab4b48 100644
--- a/locale/es/LC_MESSAGES/bitcoin.po
+++ b/locale/es/LC_MESSAGES/bitcoin.po
@@ -3,8 +3,8 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
-"PO-Revision-Date: 2010-07-15 11:07+0100\n"
-"Last-Translator: milkiway\n"
+"PO-Revision-Date: 2011-03-16 20:55+0100\n"
+"Last-Translator: Santiago M. Mola <coldwind@coldwind.org>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -15,24 +15,23 @@ msgstr ""
#: ../../../init.cpp:174
msgid "Cannot write autostart/bitcoin.desktop file"
-msgstr ""
+msgstr "No se puede escribir el fichero autostart/bitcoin.desktop"
#: ../../../init.cpp:388
-#, fuzzy
msgid "Usage:"
-msgstr ""
+msgstr "Uso:"
#: ../../../init.cpp:390
msgid "Send command to bitcoin running with -server or -daemon\n"
-msgstr ""
+msgstr "Enviar comando a bitcoin corriendo con -server o -daemon\n"
#: ../../../init.cpp:391
msgid "Get help for a command\n"
-msgstr ""
+msgstr "Recibir ayuda para un comando\n"
#: ../../../init.cpp:392
msgid "List commands\n"
-msgstr ""
+msgstr "Lista de comandos\n"
#: ../../../init.cpp:393
msgid "Options:\n"
@@ -68,11 +67,11 @@ msgstr "Conectar solo al nodo especificado\n"
#: ../../../init.cpp:401
msgid "Accept command line and JSON-RPC commands\n"
-msgstr ""
+msgstr "Aceptar comandos por linea de comandos y JSON-RPC\n"
#: ../../../init.cpp:402
msgid "Run in the background as a daemon and accept commands\n"
-msgstr ""
+msgstr "Correr en el fondo como demonio y aceptar comandos\n"
#: ../../../init.cpp:403
msgid "This help message\n"
@@ -293,11 +292,11 @@ msgstr "<b>Para:</b> "
#: ../../../ui.cpp:1247
msgid " (yours, label: "
-msgstr ""
+msgstr "(suya, etiqueta: "
#: ../../../ui.cpp:1249
msgid " (yours)"
-msgstr ""
+msgstr "(suya)"
#: ../../../ui.cpp:1286
#: ../../../ui.cpp:1298
@@ -340,9 +339,8 @@ msgid "Main"
msgstr "Principal"
#: ../../../ui.cpp:1447
-#, fuzzy
msgid "&Start Bitcoin on window system startup"
-msgstr "&Arrancar Bitcoin al arrancar el sistema"
+msgstr "&Arrancar Bitcoin al arrancar el sistema de ventanas"
#: ../../../ui.cpp:1454
msgid "&Minimize on close"
@@ -736,7 +734,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Copyright (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -747,7 +745,7 @@ msgstr ""
"\n"
"Este producto incluye software desarrollado por OpenSSL Project para su uso en el\n"
"OpenSSL Toolkit (http://www.openssl.org/) y software criptografico escrito por \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard."
#: ../../../uibase.cpp:613
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
@@ -847,3 +845,4 @@ msgstr "Sus direcciones Bitcoin"
#~ msgid "Usage: bitcoin [options]"
#~ msgstr "Uso: bitcoin [opciones]"
+
diff --git a/locale/fr/LC_MESSAGES/bitcoin.mo b/locale/fr/LC_MESSAGES/bitcoin.mo
index 6e97eff7d1..f4d669b4c0 100644
--- a/locale/fr/LC_MESSAGES/bitcoin.mo
+++ b/locale/fr/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/fr/LC_MESSAGES/bitcoin.po b/locale/fr/LC_MESSAGES/bitcoin.po
index 5bc28575ee..b173364c09 100644
--- a/locale/fr/LC_MESSAGES/bitcoin.po
+++ b/locale/fr/LC_MESSAGES/bitcoin.po
@@ -739,7 +739,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Copyright (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -750,7 +750,7 @@ msgstr ""
"\n"
"Ce produit comprend des composants logiciels développés pour le Projet OpenSSL \n"
"OpenSSL Toolkit (http://www.openssl.org/) ainsi que des composants cryptographiques \n"
-"écrits par Eric Young (eay@cryptsoft.com)."
+"écrits par Eric Young (eay@cryptsoft.com) et des logiciels UPnP écrits par Thomas Bernard.."
#: ../../../uibase.cpp:613
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
diff --git a/locale/it/LC_MESSAGES/bitcoin.mo b/locale/it/LC_MESSAGES/bitcoin.mo
index 706386487f..9347018037 100644
--- a/locale/it/LC_MESSAGES/bitcoin.mo
+++ b/locale/it/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/it/LC_MESSAGES/bitcoin.po b/locale/it/LC_MESSAGES/bitcoin.po
index 2b6f45debf..cf13239a1b 100644
--- a/locale/it/LC_MESSAGES/bitcoin.po
+++ b/locale/it/LC_MESSAGES/bitcoin.po
@@ -705,7 +705,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Copyright (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -714,9 +714,9 @@ msgstr ""
"Distribuito sotto la licenza software MIT/X11, guarda il file license.txt\n"
"incluso oppure su http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
-"Questo prodoto include software sviluppato dal progetto OpenSSL per\n"
+"Questo prodotto include software sviluppato dal progetto OpenSSL per\n"
"l'uso del (http://www.openssl.org/) e il software criptografico scritto\n"
-"da Eric Young (eay@cryptsoft.com)."
+"da Eric Young (eay@cryptsoft.com) e UPnP software scritto da Thomas Bernard."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
diff --git a/locale/nl/LC_MESSAGES/bitcoin.mo b/locale/nl/LC_MESSAGES/bitcoin.mo
index f7a3b485ba..11a547e411 100644
--- a/locale/nl/LC_MESSAGES/bitcoin.mo
+++ b/locale/nl/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/nl/LC_MESSAGES/bitcoin.po b/locale/nl/LC_MESSAGES/bitcoin.po
index 135ffad0c1..2e30388dba 100644
--- a/locale/nl/LC_MESSAGES/bitcoin.po
+++ b/locale/nl/LC_MESSAGES/bitcoin.po
@@ -15,7 +15,7 @@ msgstr ""
#: ../../../init.cpp:342
msgid "Usage: bitcoin [options]"
-msgstr ""
+msgstr "Commandoregel: bitcoin [opties]"
#: ../../../init.cpp:343
msgid "Options:\n"
@@ -31,11 +31,11 @@ msgstr "Genereer geen coins\n"
#: ../../../init.cpp:346
msgid "Start minimized\n"
-msgstr "Start geminimalizeerd\n"
+msgstr "Geminimaliseerd starten\n"
#: ../../../init.cpp:347
msgid "Specify data directory\n"
-msgstr "Specificeer data map\n"
+msgstr "Stel datamap in\n"
#: ../../../init.cpp:348
msgid "Connect through socks4 proxy\n"
@@ -43,15 +43,15 @@ msgstr "Verbind via socks4 proxy\n"
#: ../../../init.cpp:349
msgid "Add a node to connect to\n"
-msgstr "Voeg een node om naar te verbinden toe\n"
+msgstr "Voeg een node toe om mee te verbinden\n"
#: ../../../init.cpp:350
msgid "Connect only to the specified node\n"
-msgstr "Verbind alleen naar deze node\n"
+msgstr "Verbind alleen met deze node\n"
#: ../../../init.cpp:351
msgid "This help message\n"
-msgstr ""
+msgstr "Dit helpbericht\n"
#: ../../../init.cpp:455
msgid "Error loading addr.dat \n"
@@ -71,20 +71,20 @@ msgstr "Foutief -proxy adres"
#: ../../../init.cpp:629
msgid "Program has crashed and will terminate. "
-msgstr "Programma is gecrashed en word afgesloten. "
+msgstr "Het programma is gecrasht en wordt afgesloten. "
#: ../../../main.cpp:1465
msgid "Warning: Disk space is low "
-msgstr "Waarschuwng: Gebrek aan schijf ruimte "
+msgstr "Waarschuwing: Weinig schijfruimte over "
#: ../../../main.cpp:2994
#, c-format
msgid "Error: This is an oversized transaction that requires a transaction fee of %s "
-msgstr "Fout: Dit is een te grote transactie die een fooi nodig heeft van %s "
+msgstr "Fout: Dit is een te grote transactie, die een fooi vereist van %s "
#: ../../../main.cpp:2996
msgid "Error: Transaction creation failed "
-msgstr "Fout: Transactie aanmaak gefaald "
+msgstr "Fout: Aanmaken van transactie mislukt "
#: ../../../main.cpp:3001
#: ../../../ui.cpp:1761
@@ -96,26 +96,26 @@ msgstr "Versturen..."
#: ../../../main.cpp:3005
msgid "Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
-msgstr "Fout: De transactie was afgekeurd. Dit kan komen als bepaalde coins in uw Portefeuille al zijn uitgegeven. Dit kan komen doordat u wallet.dat heeft gekopieerd en wat coins heeft uitgegeven en niet terug gekopieerd heeft."
+msgstr "Fout: De transactie is afgekeurd. Dit kan gebeuren als bepaalde coins in je Portefeuille al zijn uitgegeven. Dit kan veroorzaakt worden doordat je een kopie van wallet.dat gebruikt hebt en enkel daar je uitgave geregistreerd is."
#: ../../../main.cpp:3017
msgid "Invalid amount"
-msgstr "Foutief aantal"
+msgstr "Foutieve hoeveelheid"
#: ../../../main.cpp:3019
#: ../../../ui.cpp:1971
#: ../../../ui.cpp:2038
msgid "Insufficient funds"
-msgstr "Onvoldoende coins"
+msgstr "Onvoldoende saldo"
#: ../../../main.cpp:3024
msgid "Invalid bitcoin address"
-msgstr "Foutief bitcoin adres"
+msgstr "Foutief bitcoin-adres"
#: ../../../ui.cpp:189
#, c-format
msgid "This transaction is over the size limit. You can still send it for a fee of %s, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?"
-msgstr "Deze transactie is over het limiet. U kunt nog door gaan met de transactie door een fooi te betalen van %s, deze word betaald aan de node die uw tranactie verwerkt. Wilt u de fooi betalen?"
+msgstr "Deze transactie overschrijdt de limiet. Om de transactie alsnog te verwerken kun je een fooi betalen van %s. Deze zal betaald worden aan de node die uw transactie verwerkt. Wil je doorgaan en deze fooi betalen?"
#: ../../../ui.cpp:285
msgid "Status"
@@ -131,16 +131,16 @@ msgstr "Beschrijving"
#: ../../../ui.cpp:288
msgid "Debit"
-msgstr ""
+msgstr "Debet"
#: ../../../ui.cpp:289
msgid "Credit"
-msgstr ""
+msgstr "Credit"
#: ../../../ui.cpp:489
#, c-format
msgid "Open for %d blocks"
-msgstr "Open voor %d blocks"
+msgstr "Open gedurende %d blokken"
#: ../../../ui.cpp:491
#, c-format
@@ -169,7 +169,7 @@ msgstr "Gegenereerd"
#: ../../../ui.cpp:592
#, c-format
msgid "Generated (%s matures in %d more blocks)"
-msgstr "Gegenereerd (%s word volwassen in %d blokken)"
+msgstr "Gegenereerd (%s wordt volwassen over %d blokken)"
#: ../../../ui.cpp:596
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
@@ -185,11 +185,11 @@ msgstr "Van: "
#: ../../../ui.cpp:634
msgid "Received with: "
-msgstr "Ontvangen met: "
+msgstr "Ontvangen op: "
#: ../../../ui.cpp:676
msgid "Payment to yourself"
-msgstr "Betaling naar u zelf"
+msgstr "Betaling naar uzelf"
#: ../../../ui.cpp:713
msgid "To: "
@@ -197,7 +197,7 @@ msgstr "Naar: "
#: ../../../ui.cpp:1009
msgid " Generating"
-msgstr " Genereert"
+msgstr " Genereren..."
#: ../../../ui.cpp:1011
msgid "(not connected)"
@@ -211,7 +211,7 @@ msgstr " %d verbindingen %d blokken %d transacties"
#: ../../../ui.cpp:1123
#: ../../../ui.cpp:2351
msgid "New Receiving Address"
-msgstr "Nieuw Ontvangings Adres"
+msgstr "Nieuw Ontvangstadres"
#: ../../../ui.cpp:1124
#: ../../../ui.cpp:2352
@@ -220,7 +220,7 @@ msgid ""
"\n"
"Label"
msgstr ""
-"Het is goed beleid om een nieuw adres voor elke betaling te hebben.\n"
+"Het is een goede gewoonte om voor iedere betaling die je ontvangt een nieuw adres aan te maken.\n"
"\n"
"Label"
@@ -267,40 +267,40 @@ msgstr "<b>Naar:</b> "
#: ../../../ui.cpp:1242
msgid " (yours, label: "
-msgstr ""
+msgstr " (van jou, label: "
#: ../../../ui.cpp:1244
#, fuzzy
msgid " (yours)"
-msgstr ""
+msgstr " (van jou)"
#: ../../../ui.cpp:1281
#: ../../../ui.cpp:1293
#: ../../../ui.cpp:1356
msgid "<b>Credit:</b> "
-msgstr ""
+msgstr "<b>Credit:</b>"
#: ../../../ui.cpp:1283
#, c-format
msgid "(%s matures in %d more blocks)"
-msgstr "(%s word volwassen in %d blokken)"
+msgstr "(%s wordt volwassen over %d blokken)"
#: ../../../ui.cpp:1285
msgid "(not accepted)"
-msgstr "(niet geaccepteerd"
+msgstr "(niet geaccepteerd)"
#: ../../../ui.cpp:1330
#: ../../../ui.cpp:1353
msgid "<b>Debit:</b> "
-msgstr ""
+msgstr "<b>Debet:</b>"
#: ../../../ui.cpp:1344
msgid "<b>Transaction fee:</b> "
-msgstr "<b>Transactie fooi:</b> "
+msgstr "<b>Transactiefooi:</b> "
#: ../../../ui.cpp:1360
msgid "<b>Net amount:</b> "
-msgstr "<b>Netto bedrag:</b> "
+msgstr "<b>Nettobedrag:</b> "
#: ../../../ui.cpp:1367
msgid "Message:"
@@ -308,15 +308,15 @@ msgstr "Mededeling:"
#: ../../../ui.cpp:1370
msgid "Generated coins must wait 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, it will change to \"not accepted\" and not be spendable. This may occasionally happen if another node generates a block within a few seconds of yours."
-msgstr "Gegenereerde coins moeten 120 blokken wachten voordat ze uitgegeven kunnen worden. Wanneer je dit blok genereerde, werd het naar het netwerk gestuurd om opgenomen teworden in de rest van de blokken. Als dit faalt, dan zal de dit veranderen in \"niet geaccepteerd\" en zal niet uitgeefbaar zijn. Dit kan soms gebeuren als een node ook een blok rond dezelfde periode genereerd."
+msgstr "Gegenereerde coins mogen pas na een wachttijd van 120 blokken uitgegeven worden. Op het moment dat dit blok gegenereerd werd, is het naar het netwerk verzonden om aan de blokkenreeks toegevoegd te worden. Als het niet succesvol in de blokkenreeks opgenomen kan worden verandert de status in \"niet geaccepteerd\" en kan het niet uitegegeven worden. Dit kan soms gebeuren als een andere node op ongeveer hetzelfde moment een blok genereert."
#: ../../../ui.cpp:1437
msgid "Main"
-msgstr "Hoofd"
+msgstr "Algemeen"
#: ../../../ui.cpp:1442
msgid "&Minimize on close"
-msgstr "&Minimalizeer bij sluiten"
+msgstr "&Minimaliseer bij sluiten van het venster"
#: ../../../ui.cpp:1595
#, c-format
@@ -325,7 +325,7 @@ msgstr "versie %s%s BETA"
#: ../../../ui.cpp:1681
msgid "Will appear as \"From: Unknown\""
-msgstr "Word vertoont als \"Van: Onbekend\""
+msgstr "Wordt weergegeven als \"Van: Onbekend\""
#: ../../../ui.cpp:1681
msgid "n/a"
@@ -337,7 +337,7 @@ msgstr "Onbekend"
#: ../../../ui.cpp:1682
msgid "Can't include a message when sending to a Bitcoin address"
-msgstr "Kan geen mededeling versturen bij gebruik van Bitcoin adressen"
+msgstr "Kan geen mededeling bijvoegen bij gebruik van bitcoin-adressen"
#: ../../../ui.cpp:1735
msgid "Error in amount "
@@ -349,23 +349,23 @@ msgstr "Fout in hoeveelheid "
#: ../../../ui.cpp:1771
#: ../../../uibase.cpp:61
msgid "Send Coins"
-msgstr "Verstuur Coins"
+msgstr "Verstuur coins"
#: ../../../ui.cpp:1740
msgid "Amount exceeds your balance "
-msgstr "Hoeveelheid hoger dan uw huidige balans "
+msgstr "Hoeveelheid overschrijdt uw huidige balans "
#: ../../../ui.cpp:1745
msgid "Total exceeds your balance when the "
-msgstr "Totaal groter dan uw huidige balans wanner de "
+msgstr "Totaal overschrijdt uw huidige balans wanneer de "
#: ../../../ui.cpp:1745
msgid " transaction fee is included "
-msgstr " transactie fooi is bijgerekend "
+msgstr " transactiefooi is meegerekend "
#: ../../../ui.cpp:1761
msgid "Payment sent "
-msgstr "Betaling verstuurd "
+msgstr "Betaling verzonden "
#: ../../../ui.cpp:1771
msgid "Invalid address "
@@ -374,7 +374,7 @@ msgstr "Foutief adres "
#: ../../../ui.cpp:1825
#, c-format
msgid "Sending %s to %s"
-msgstr "Verstuurd %s naar %s"
+msgstr "%s versturen naar %s"
#: ../../../ui.cpp:1898
#: ../../../ui.cpp:1931
@@ -419,16 +419,16 @@ msgstr "Foutief antwoord ontvangen"
#: ../../../ui.cpp:2034
msgid "Creating transaction..."
-msgstr "Maakt transactie aan..."
+msgstr "Transactie aanmaken..."
#: ../../../ui.cpp:2046
#, c-format
msgid "This is an oversized transaction that requires a transaction fee of %s"
-msgstr "Dit is een te grote transactie die een transactie fooi vereist van %s"
+msgstr "Fout: Dit is een te grote transactie, die een fooi vereist van %s"
#: ../../../ui.cpp:2048
msgid "Transaction creation failed"
-msgstr "Transactie aanmaak gefaald."
+msgstr "Aanmaken van transactie mislukt"
#: ../../../ui.cpp:2055
msgid "Transaction aborted"
@@ -440,11 +440,11 @@ msgstr "Verbinding verloren, transactie geannuleerd"
#: ../../../ui.cpp:2079
msgid "Sending payment..."
-msgstr "Versturen van betaling..."
+msgstr "Betaling versturen..."
#: ../../../ui.cpp:2085
msgid "The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."
-msgstr "De transactie was afgekeurd. Dit kan komen als bepaalde coins in uw Portefeuille al zijn uitgegeven. Dit kan komen doordat u wallet.dat heeft gekopieerd en wat coins heeft uitgegeven en niet terug gekopieerd heeft."
+msgstr "Fout: De transactie is afgekeurd. Dit kan gebeuren als bepaalde coins in je Portefeuille al zijn uitgegeven. Dit kan veroorzaakt worden doordat je een kopie van wallet.dat gebruikt hebt en enkel daar je uitgave geregistreerd is."
#: ../../../ui.cpp:2092
msgid "Waiting for confirmation..."
@@ -456,13 +456,13 @@ msgid ""
"The transaction is recorded and will credit to the recipient,\n"
"but the comment information will be blank."
msgstr ""
-"De betaling was verstuurd, maar de ontvanger kon het niet verifieeren.\n"
-"De transactie is opgenomen en word uitbetaald aan de ontvanger,\n"
-"maar de mededeling blijft blank bij de ontanger."
+"De betaling is verstuurd, maar de ontvanger kon hem niet verifiëren.\n"
+"De transactie is opgenomen en wordt uitbetaald aan de ontvanger,\n"
+"maar het mededelings-veld blijft blanco."
#: ../../../ui.cpp:2119
msgid "Payment was sent, but an invalid response was received"
-msgstr "Betaling was verstuurd, maar een foutief antword was ontvangen."
+msgstr "Betaling is verstuurd, maar een foutief antword is ontvangen."
#: ../../../ui.cpp:2125
msgid "Payment completed"
@@ -488,25 +488,25 @@ msgstr "Label"
#: ../../../ui.cpp:2160
#: ../../../uibase.cpp:908
msgid "Bitcoin Address"
-msgstr "Bitcoin Adres"
+msgstr "Bitcoin-adres"
#: ../../../ui.cpp:2284
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
-msgstr "Dit is een van uw eigen adressen voor het ontvangen van betalingen en can niet worden toegevoegd aan uw adressen boek. "
+msgstr "Dit is een van uw eigen adressen voor het ontvangen van betalingen, en kan niet worden toegevoegd aan uw adresboek. "
#: ../../../ui.cpp:2302
#: ../../../ui.cpp:2308
msgid "Edit Address"
-msgstr "Bewerk Adres"
+msgstr "Bewerk adres"
#: ../../../ui.cpp:2314
msgid "Edit Address Label"
-msgstr "Bewerk Adres Label"
+msgstr "Bewerk adreslabel"
#: ../../../ui.cpp:2339
#: ../../../ui.cpp:2345
msgid "Add Address"
-msgstr "Adres Toevoegen"
+msgstr "Adres toevoegen"
#: ../../../ui.cpp:2421
msgid "Bitcoin"
@@ -514,7 +514,7 @@ msgstr "Bitcoin"
#: ../../../ui.cpp:2423
msgid "Bitcoin - Generating"
-msgstr "Bitcoin - Genereert"
+msgstr "Bitcoin - Genereren..."
#: ../../../ui.cpp:2425
msgid "Bitcoin - (not connected)"
@@ -531,7 +531,7 @@ msgstr "O&pties"
#: ../../../ui.cpp:2502
#: ../../../uibase.cpp:34
msgid "&Generate Coins"
-msgstr "&Genereer Coins"
+msgstr "&Genereer coins"
#: ../../../ui.cpp:2505
#: ../../../uibase.cpp:27
@@ -544,7 +544,7 @@ msgstr "&Bestand"
#: ../../../uibase.cpp:38
msgid "&Your Receiving Addresses..."
-msgstr "&Uw Ontvang Adressen..."
+msgstr "&Uw ontvangstadressen..."
#: ../../../uibase.cpp:42
msgid "&Options..."
@@ -564,11 +564,11 @@ msgstr "&Help"
#: ../../../uibase.cpp:62
msgid "Address Book"
-msgstr "Adressen Boek"
+msgstr "Adresboek"
#: ../../../uibase.cpp:77
msgid "Your Bitcoin Address:"
-msgstr "Uw Bitcoin Address:"
+msgstr "Uw bitcoin-adres:"
#: ../../../uibase.cpp:84
msgid " &New... "
@@ -578,7 +578,7 @@ msgstr " &Nieuw... "
#: ../../../uibase.cpp:851
#: ../../../uibase.cpp:954
msgid " &Copy to Clipboard "
-msgstr " &Kopieer naar Plakboord "
+msgstr " &Kopieer naar plakbord "
#: ../../../uibase.cpp:102
msgid "Balance:"
@@ -598,7 +598,7 @@ msgstr " Ontvangen"
#: ../../../uibase.cpp:121
msgid " In Progress"
-msgstr " Word Verwerkt"
+msgstr " Wordt verwerkt"
#: ../../../uibase.cpp:142
msgid "All Transactions"
@@ -628,15 +628,15 @@ msgstr "OK"
#: ../../../uibase.cpp:361
msgid "Optional transaction fee you give to the nodes that process your transactions."
-msgstr "Optionele transactie fooi die u geeft aan de nodes doe uw betaling verwerken."
+msgstr "Optionele transactiefooi die u geeft aan de nodes die uw transacties verwerken."
#: ../../../uibase.cpp:370
msgid "Transaction fee:"
-msgstr "Transactie fooi:"
+msgstr "Transactiefooi:"
#: ../../../uibase.cpp:386
msgid "&Limit coin generation to"
-msgstr "&Limiteer coin generatie tot"
+msgstr "&Limiteer coin-generatie tot"
#: ../../../uibase.cpp:393
msgid "processors"
@@ -648,11 +648,11 @@ msgstr "&Start Bitcoin wanneer het systeem opstart"
#: ../../../uibase.cpp:403
msgid "&Minimize to the tray instead of the taskbar"
-msgstr "&Minimalizeer tot systeemvak inplaats van taakbalk"
+msgstr "&Minimaliseer tot systeemvak in plaats van de taakbalk"
#: ../../../uibase.cpp:407
msgid "M&inimize to the tray on close"
-msgstr "M&inimalizeer tot taakbalk bij sluiten"
+msgstr "M&inimaliseer tot taakbalk bij sluiten"
#: ../../../uibase.cpp:414
msgid "&Connect through socks4 proxy: "
@@ -681,7 +681,7 @@ msgstr ""
#: ../../../uibase.cpp:966
#: ../../../uibase.cpp:1055
msgid "Cancel"
-msgstr "Annuleer"
+msgstr "Annuleren"
#: ../../../uibase.cpp:485
msgid "&Apply"
@@ -706,26 +706,27 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
-"Copyright (c) 2009-2010 Bitcoin Developers\n"
+"Copyright (c) 2009-2011 Bitcoin-ontwikkelaars\n"
"\n"
"Dit is experimentele software.\n"
"\n"
-"Gedistributeerd onder de MIT/X11 software licentie, see het bijbehorende bestand \n"
-"license.txt of http://www.opensource.org/licenses/mit-license.php.\n"
+"Gedistributeerd onder de MIT/X11 software licentie, zie het bijgevoegde bestand \n"
+"license.txt of kijk op http://www.opensource.org/licenses/mit-license.php.\n"
"\n"
-"Dit product komt met software ontwikkeld door het OpenSSL Project for gebruik \n"
-"in de OpenSSL Toolkit (http://www.openssl.org/) and de cryptografische \n"
-"software geschreven door Eric Young (eay@cryptsoft.com)."
+"Dit product bevat software ontwikkeld door het OpenSSL project for gebruik \n"
+"in de OpenSSL Toolkit (http://www.openssl.org/), en cryptografische \n"
+"software geschreven door Eric Young (eay@cryptsoft.com)) en UPnP software geschreven\n"
+"door Thomas Bernard."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
-msgstr "Voer een Bitcoin adres (bijvoorbeeld: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) of IP address (bijvoorbeeld: 123.45.6.7) in."
+msgstr "Voer een bitcoin-adres (bijvoorbeeld: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) of IP-adres (bijvoorbeeld: 123.45.6.7) in."
#: ../../../uibase.cpp:633
msgid "Pay &To:"
-msgstr "Betaal &Naar:"
+msgstr "Betaal &aan:"
#: ../../../uibase.cpp:648
msgid "&Paste"
@@ -733,7 +734,7 @@ msgstr "&Plakken"
#: ../../../uibase.cpp:651
msgid " Address &Book..."
-msgstr " Adressen &Boek..."
+msgstr " Adres&boek..."
#: ../../../uibase.cpp:658
msgid "&Amount:"
@@ -757,7 +758,7 @@ msgstr "&Mededeling:"
#: ../../../uibase.cpp:730
msgid "&Send"
-msgstr "&Verstuur"
+msgstr "&Versturen"
#: ../../../uibase.cpp:782
msgid ""
@@ -771,37 +772,37 @@ msgstr ""
#: ../../../uibase.cpp:832
msgid "These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you. The highlighted address is displayed in the main window."
-msgstr "Dit zijn uw Bitcoin Adressen voor het ontvangen van betalingen. Misschien wilt u elk contact persoon een ander adres geven zodat u kunt bij houden wie er u heeft betaald. De opgelichte adressen worden weergeven in het hoofd venster."
+msgstr "Dit zijn je bitcoin-adressen voor het ontvangen van betalingen. Het is een goed idee iedere afzender een ander adres te geven zodat je bij kunt houden wie je een betaling stuurt. Het geselecteerde adres is zichtbaar in het hoofdscherm."
#: ../../../uibase.cpp:845
#: ../../../uibase.cpp:957
msgid "&Edit..."
-msgstr "&Bewerk..."
+msgstr "&Bewerken..."
#: ../../../uibase.cpp:848
#: ../../../uibase.cpp:960
msgid " &New Address... "
-msgstr " &New Adres... "
+msgstr " &Nieuw adres... "
#: ../../../uibase.cpp:920
msgid "Sending"
-msgstr "Versturen"
+msgstr "Versturen..."
#: ../../../uibase.cpp:928
msgid "These are your Bitcoin addresses for receiving payments. You can give a different one to each sender to keep track of who is paying you. The highlighted address will be displayed in the main window."
-msgstr "Dit zijn uw Bitcoin adressen voor het ontvangen van betalingen. U kunt een aan elk contact persoon geven zodat u een overzicht kunt houden wie u betaald. Dit adres zal wergeven worden in het hoofd main venster."
+msgstr "Dit zijn je bitcoin-adressen voor het ontvangen van betalingen. Het is een goed idee iedere afzender een ander adres te geven zodat je bij kunt houden wie je een betaling stuurt. Het geselecteerde adres is zichtbaar in het hoofdscherm."
#: ../../../uibase.cpp:941
msgid "Receiving"
-msgstr "Ontvangen"
+msgstr "Ontvangen..."
#: ../../../uibase.cpp:951
msgid "&Delete"
-msgstr "&Verwijder"
+msgstr "&Verwijderen"
#: ../../../uibase.h:150
msgid "Transaction Details"
-msgstr "Transactie Details"
+msgstr "Transactiedetails"
#: ../../../uibase.h:203
msgid "Options"
@@ -813,4 +814,4 @@ msgstr "Over Bitcoin"
#: ../../../uibase.h:341
msgid "Your Bitcoin Addresses"
-msgstr "Uw Bitcoin Adressen"
+msgstr "Uw bitcoin-adressen"
diff --git a/locale/pt/LC_MESSAGES/bitcoin.mo b/locale/pt/LC_MESSAGES/bitcoin.mo
index 7c662c1540..20e100f578 100644
--- a/locale/pt/LC_MESSAGES/bitcoin.mo
+++ b/locale/pt/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/pt/LC_MESSAGES/bitcoin.po b/locale/pt/LC_MESSAGES/bitcoin.po
index f37fef20f1..9bf193e19b 100644
--- a/locale/pt/LC_MESSAGES/bitcoin.po
+++ b/locale/pt/LC_MESSAGES/bitcoin.po
@@ -705,7 +705,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Copyright (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -716,7 +716,8 @@ msgstr ""
"http://www.opensource.org/licenses/mit-license.php.\n"
"Este producto inclui software desenvolvido pelo projecto OpenSSL, para \n"
"ser utilizado no OpenSSL Toolkit (http://www.openssl.org) e software de \n"
-"criptografia desenvolvido por Eric Young (eay@cryptsoft.com)."
+"criptografia desenvolvido por Eric Young (eay@cryptsoft.com)\n"
+"e UPnP software escrito por Thomas Bernard."
#: ../../../uibase.cpp:619
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
diff --git a/locale/ru/LC_MESSAGES/bitcoin.mo b/locale/ru/LC_MESSAGES/bitcoin.mo
index 4af3e0dfa0..b44c10ad47 100644
--- a/locale/ru/LC_MESSAGES/bitcoin.mo
+++ b/locale/ru/LC_MESSAGES/bitcoin.mo
Binary files differ
diff --git a/locale/ru/LC_MESSAGES/bitcoin.po b/locale/ru/LC_MESSAGES/bitcoin.po
index 1b893bfc42..5a87259c9e 100644
--- a/locale/ru/LC_MESSAGES/bitcoin.po
+++ b/locale/ru/LC_MESSAGES/bitcoin.po
@@ -769,7 +769,7 @@ msgid ""
"\n"
"This product includes software developed by the OpenSSL Project for use in the \n"
"OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."
msgstr ""
"Все права защищены (c) 2009-2010 Bitcoin Developers\n"
"\n"
@@ -780,7 +780,7 @@ msgstr ""
"\n"
"Этот продукт включает ПО, разработанное проектом OpenSSL для использования в\n"
"OpenSSL Toolkit (http://www.openssl.org/), и криптографическое ПО, написанное\n"
-"Eric Young (eay@cryptsoft.com)."
+"Eric Young (eay@cryptsoft.com) и UPnP программного обеспечения, написанного Thomas Bernard."
#: ../../../uibase.cpp:613
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
diff --git a/main.cpp b/main.cpp
index 3caee69afd..1c2292badb 100644
--- a/main.cpp
+++ b/main.cpp
@@ -65,6 +65,14 @@ int fLimitProcessors = false;
int nLimitProcessors = 1;
int fMinimizeToTray = true;
int fMinimizeOnClose = true;
+#ifdef USE_UPNP
+#if USE_UPNP
+int fUseUPnP = true;
+#else
+int fUseUPnP = false;
+#endif
+#endif
+
@@ -4062,35 +4070,35 @@ bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
+// requires cs_main lock
string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
{
- CRITICAL_BLOCK(cs_main)
+ CReserveKey reservekey;
+ int64 nFeeRequired;
+ if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired))
{
- CReserveKey reservekey;
- int64 nFeeRequired;
- if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired))
- {
- string strError;
- if (nValue + nFeeRequired > GetBalance())
- strError = strprintf(_("Error: This is an oversized transaction that requires a transaction fee of %s "), FormatMoney(nFeeRequired).c_str());
- else
- strError = _("Error: Transaction creation failed ");
- printf("SendMoney() : %s", strError.c_str());
- return strError;
- }
+ string strError;
+ if (nValue + nFeeRequired > GetBalance())
+ strError = strprintf(_("Error: This is an oversized transaction that requires a transaction fee of %s "), FormatMoney(nFeeRequired).c_str());
+ else
+ strError = _("Error: Transaction creation failed ");
+ printf("SendMoney() : %s", strError.c_str());
+ return strError;
+ }
- if (fAskFee && !ThreadSafeAskFee(nFeeRequired, _("Sending..."), NULL))
- return "ABORTED";
+ if (fAskFee && !ThreadSafeAskFee(nFeeRequired, _("Sending..."), NULL))
+ return "ABORTED";
+
+ if (!CommitTransaction(wtxNew, reservekey))
+ return _("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
- if (!CommitTransaction(wtxNew, reservekey))
- return _("Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
- }
MainFrameRepaint();
return "";
}
+// requires cs_main lock
string SendMoneyToBitcoinAddress(string strAddress, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
{
// Check amount
diff --git a/main.h b/main.h
index 0711d4ba0a..7becd08462 100644
--- a/main.h
+++ b/main.h
@@ -22,6 +22,11 @@ static const int64 CENT = 1000000;
static const int64 MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
static const int COINBASE_MATURITY = 100;
+#ifdef USE_UPNP
+static const int fHaveUPnP = true;
+#else
+static const int fHaveUPnP = false;
+#endif
@@ -55,6 +60,7 @@ extern int fLimitProcessors;
extern int nLimitProcessors;
extern int fMinimizeToTray;
extern int fMinimizeOnClose;
+extern int fUseUPnP;
diff --git a/makefile.mingw b/makefile.mingw
index 6b849f93f6..1969ecc971 100644
--- a/makefile.mingw
+++ b/makefile.mingw
@@ -2,6 +2,7 @@
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
+USE_UPNP:=0
INCLUDEPATHS= \
-I"C:\boost-1.43.0-mgw" \
@@ -25,8 +26,7 @@ LIBS= \
-l boost_program_options-mgw45-mt-s-1_43 \
-l boost_thread-mgw45-mt-s-1_43 \
-l db_cxx \
- -l eay32 \
- -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
+ -l eay32
DEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH
DEBUGFLAGS=-g -D__WXDEBUG__
@@ -34,6 +34,15 @@ CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS) $(I
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
+ifdef USE_UPNP
+ INCLUDEPATHS += -I"C:\upnpc-exe-win32-20110215"
+ LIBPATHS += -L"C:\upnpc-exe-win32-20110215"
+ LIBS += -l miniupnpc -l iphlpapi
+ DEFS += -DSTATICLIB -DUSE_UPNP=$(USE_UPNP)
+endif
+
+LIBS += -l kernel32 -l user32 -l gdi32 -l comdlg32 -l winspool -l winmm -l shell32 -l comctl32 -l ole32 -l oleaut32 -l uuid -l rpcrt4 -l advapi32 -l ws2_32 -l shlwapi
+
OBJS= \
obj/util.o \
obj/script.o \
diff --git a/makefile.osx b/makefile.osx
index 5c1ca6fba7..4836ea3f4f 100644
--- a/makefile.osx
+++ b/makefile.osx
@@ -16,6 +16,8 @@ LIBPATHS= \
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
+USE_UPNP:=0
+
LIBS= -dead_strip \
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
$(DEPSDIR)/lib/libboost_system.a \
@@ -44,6 +46,11 @@ OBJS= \
obj/init.o \
cryptopp/obj/sha.o \
cryptopp/obj/cpu.o
+
+ifdef USE_UPNP
+ LIBS += $(DEPSDIR)/lib/libminiupnpc.a
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
all: bitcoin
diff --git a/makefile.unix b/makefile.unix
index d306f746d3..61b925e3bc 100644
--- a/makefile.unix
+++ b/makefile.unix
@@ -8,6 +8,10 @@ WXINCLUDEPATHS=$(shell wx-config --cxxflags)
WXLIBS=$(shell wx-config --libs)
+USE_UPNP:=0
+
+DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
+
# for boost 1.37, add -mt to the boost libraries
LIBS= \
-Wl,-Bstatic \
@@ -17,13 +21,20 @@ LIBS= \
-l boost_thread \
-l db_cxx \
-l ssl \
- -l crypto \
+ -l crypto
+
+ifdef USE_UPNP
+ LIBS += -l miniupnpc
+ DEFS += -DUSE_UPNP=$(USE_UPNP)
+endif
+
+LIBS+= \
-Wl,-Bdynamic \
-l gthread-2.0 \
-l z \
-l dl
-DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
+
DEBUGFLAGS=-g -D__WXDEBUG__
CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
diff --git a/net.cpp b/net.cpp
index 372402f51f..833aafc0a1 100644
--- a/net.cpp
+++ b/net.cpp
@@ -4,11 +4,21 @@
#include "headers.h"
+#ifdef USE_UPNP
+#include <miniupnpc/miniwget.h>
+#include <miniupnpc/miniupnpc.h>
+#include <miniupnpc/upnpcommands.h>
+#include <miniupnpc/upnperrors.h>
+#endif
+
static const int MAX_OUTBOUND_CONNECTIONS = 8;
void ThreadMessageHandler2(void* parg);
void ThreadSocketHandler2(void* parg);
void ThreadOpenConnections2(void* parg);
+#ifdef USE_UPNP
+void ThreadMapPort2(void* parg);
+#endif
bool OpenNetworkConnection(const CAddress& addrConnect);
@@ -857,8 +867,112 @@ void ThreadSocketHandler2(void* parg)
+#ifdef USE_UPNP
+void ThreadMapPort(void* parg)
+{
+ IMPLEMENT_RANDOMIZE_STACK(ThreadMapPort(parg));
+ try
+ {
+ vnThreadsRunning[5]++;
+ ThreadMapPort2(parg);
+ vnThreadsRunning[5]--;
+ }
+ catch (std::exception& e) {
+ vnThreadsRunning[5]--;
+ PrintException(&e, "ThreadMapPort()");
+ } catch (...) {
+ vnThreadsRunning[5]--;
+ PrintException(NULL, "ThreadMapPort()");
+ }
+ printf("ThreadMapPort exiting\n");
+}
+
+void ThreadMapPort2(void* parg)
+{
+ printf("ThreadMapPort started\n");
+
+ char port[6];
+ sprintf(port, "%d", ntohs(GetDefaultPort()));
+
+ const char * rootdescurl = 0;
+ const char * multicastif = 0;
+ const char * minissdpdpath = 0;
+ struct UPNPDev * devlist = 0;
+ char lanaddr[64];
+
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
+
+ struct UPNPUrls urls;
+ struct IGDdatas data;
+ int r;
+
+ if (UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr)) == 1)
+ {
+ char intClient[16];
+ char intPort[6];
+
+#ifndef __WXMSW__
+ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
+ port, port, lanaddr, 0, "TCP", 0);
+#else
+ r = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype,
+ port, port, lanaddr, 0, "TCP", 0, "0");
+#endif
+ if(r!=UPNPCOMMAND_SUCCESS)
+ printf("AddPortMapping(%s, %s, %s) failed with code %d (%s)\n",
+ port, port, lanaddr, r, strupnperror(r));
+ else
+ printf("UPnP Port Mapping successful.\n");
+ loop {
+ if (fShutdown || !fUseUPnP)
+ {
+ r = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port, "TCP", 0);
+ printf("UPNP_DeletePortMapping() returned : %d\n", r);
+ freeUPNPDevlist(devlist); devlist = 0;
+ FreeUPNPUrls(&urls);
+ return;
+ }
+ Sleep(2000);
+ }
+ } else {
+ printf("No valid UPnP IGDs found\n");
+ freeUPNPDevlist(devlist); devlist = 0;
+ FreeUPNPUrls(&urls);
+ loop {
+ if (fShutdown)
+ return;
+ Sleep(2000);
+ }
+ }
+}
+
+void MapPort(bool fMapPort)
+{
+ if (fUseUPnP != fMapPort)
+ {
+ fUseUPnP = fMapPort;
+ CWalletDB().WriteSetting("fUseUPnP", fUseUPnP);
+ }
+ if (fUseUPnP && vnThreadsRunning[5] < 1)
+ {
+ if (!CreateThread(ThreadMapPort, NULL))
+ printf("Error: ThreadMapPort(ThreadMapPort) failed\n");
+ }
+}
+#endif
+
+
+
+
+
+
+
+
+
+
static const char *strDNSSeed[] = {
"bitseed.xf2.org",
+ "bitseed.bitcoin.org.uk",
};
void DNSAddressSeed()
@@ -1409,6 +1523,10 @@ void StartNode(void* parg)
// Start threads
//
+ // Map ports with UPnP
+ if (fHaveUPnP)
+ MapPort(fUseUPnP);
+
// Get addresses from IRC and advertise ours
if (!CreateThread(ThreadIRCSeed, NULL))
printf("Error: CreateThread(ThreadIRCSeed) failed\n");
@@ -1434,7 +1552,11 @@ bool StopNode()
fShutdown = true;
nTransactionsUpdated++;
int64 nStart = GetTime();
- while (vnThreadsRunning[0] > 0 || vnThreadsRunning[2] > 0 || vnThreadsRunning[3] > 0 || vnThreadsRunning[4] > 0)
+ while (vnThreadsRunning[0] > 0 || vnThreadsRunning[2] > 0 || vnThreadsRunning[3] > 0 || vnThreadsRunning[4] > 0
+#ifdef USE_UPNP
+ || vnThreadsRunning[5] > 0
+#endif
+ )
{
if (GetTime() - nStart > 20)
break;
@@ -1445,6 +1567,7 @@ bool StopNode()
if (vnThreadsRunning[2] > 0) printf("ThreadMessageHandler still running\n");
if (vnThreadsRunning[3] > 0) printf("ThreadBitcoinMiner still running\n");
if (vnThreadsRunning[4] > 0) printf("ThreadRPCServer still running\n");
+ if (fHaveUPnP && vnThreadsRunning[5] > 0) printf("ThreadMapPort still running\n");
while (vnThreadsRunning[2] > 0 || vnThreadsRunning[4] > 0)
Sleep(20);
Sleep(50);
diff --git a/net.h b/net.h
index 7d4974fd01..b3bd74da47 100644
--- a/net.h
+++ b/net.h
@@ -30,6 +30,7 @@ CNode* FindNode(unsigned int ip);
CNode* ConnectNode(CAddress addrConnect, int64 nTimeout=0);
void AbandonRequests(void (*fn)(void*, CDataStream&), void* param1);
bool AnySubscribed(unsigned int nChannel);
+void MapPort(bool fMapPort);
void DNSAddressSeed();
bool BindListenPort(string& strError=REF(string()));
void StartNode(void* parg);
diff --git a/rpc.cpp b/rpc.cpp
index 97710ff6b8..d527f9b35a 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -315,46 +315,45 @@ Value getnewaddress(const Array& params, bool fHelp)
}
+// requires cs_main, cs_mapWallet locks
string GetAccountAddress(string strAccount, bool bForceNew=false)
{
string strAddress;
- CRITICAL_BLOCK(cs_mapWallet)
- {
- CWalletDB walletdb;
- walletdb.TxnBegin();
-
- CAccount account;
- walletdb.ReadAccount(strAccount, account);
+ CWalletDB walletdb;
+ walletdb.TxnBegin();
- // Check if the current key has been used
- if (!account.vchPubKey.empty())
- {
- CScript scriptPubKey;
- scriptPubKey.SetBitcoinAddress(account.vchPubKey);
- for (map<uint256, CWalletTx>::iterator it = mapWallet.begin();
- it != mapWallet.end() && !account.vchPubKey.empty();
- ++it)
- {
- const CWalletTx& wtx = (*it).second;
- foreach(const CTxOut& txout, wtx.vout)
- if (txout.scriptPubKey == scriptPubKey)
- account.vchPubKey.clear();
- }
- }
+ CAccount account;
+ walletdb.ReadAccount(strAccount, account);
- // Generate a new key
- if (account.vchPubKey.empty() || bForceNew)
+ // Check if the current key has been used
+ if (!account.vchPubKey.empty())
+ {
+ CScript scriptPubKey;
+ scriptPubKey.SetBitcoinAddress(account.vchPubKey);
+ for (map<uint256, CWalletTx>::iterator it = mapWallet.begin();
+ it != mapWallet.end() && !account.vchPubKey.empty();
+ ++it)
{
- account.vchPubKey = GetKeyFromKeyPool();
- string strAddress = PubKeyToAddress(account.vchPubKey);
- SetAddressBookName(strAddress, strAccount);
- walletdb.WriteAccount(strAccount, account);
+ const CWalletTx& wtx = (*it).second;
+ foreach(const CTxOut& txout, wtx.vout)
+ if (txout.scriptPubKey == scriptPubKey)
+ account.vchPubKey.clear();
}
+ }
- walletdb.TxnCommit();
- strAddress = PubKeyToAddress(account.vchPubKey);
+ // Generate a new key
+ if (account.vchPubKey.empty() || bForceNew)
+ {
+ account.vchPubKey = GetKeyFromKeyPool();
+ string strAddress = PubKeyToAddress(account.vchPubKey);
+ SetAddressBookName(strAddress, strAccount);
+ walletdb.WriteAccount(strAccount, account);
}
+
+ walletdb.TxnCommit();
+ strAddress = PubKeyToAddress(account.vchPubKey);
+
return strAddress;
}
@@ -368,7 +367,15 @@ Value getaccountaddress(const Array& params, bool fHelp)
// Parse the account first so we don't generate a key if there's an error
string strAccount = AccountFromValue(params[0]);
- return GetAccountAddress(strAccount);
+ Value ret;
+
+ CRITICAL_BLOCK(cs_main)
+ CRITICAL_BLOCK(cs_mapWallet)
+ {
+ ret = GetAccountAddress(strAccount);
+ }
+
+ return ret;
}
@@ -392,6 +399,8 @@ Value setaccount(const Array& params, bool fHelp)
strAccount = AccountFromValue(params[1]);
// Detect when changing the account of an address that is the 'unused current key' of another account:
+ CRITICAL_BLOCK(cs_main)
+ CRITICAL_BLOCK(cs_mapWallet)
CRITICAL_BLOCK(cs_mapAddressBook)
{
if (mapAddressBook.count(strAddress))
@@ -475,9 +484,13 @@ Value sendtoaddress(const Array& params, bool fHelp)
if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty())
wtx.mapValue["to"] = params[3].get_str();
- string strError = SendMoneyToBitcoinAddress(strAddress, nAmount, wtx);
- if (strError != "")
- throw JSONRPCError(-4, strError);
+ CRITICAL_BLOCK(cs_main)
+ {
+ string strError = SendMoneyToBitcoinAddress(strAddress, nAmount, wtx);
+ if (strError != "")
+ throw JSONRPCError(-4, strError);
+ }
+
return wtx.GetHash().GetHex();
}
@@ -752,6 +765,7 @@ Value sendfrom(const Array& params, bool fHelp)
if (params.size() > 5 && params[5].type() != null_type && !params[5].get_str().empty())
wtx.mapValue["to"] = params[5].get_str();
+ CRITICAL_BLOCK(cs_main)
CRITICAL_BLOCK(cs_mapWallet)
{
// Check funds
@@ -808,6 +822,7 @@ Value sendmany(const Array& params, bool fHelp)
vecSend.push_back(make_pair(scriptPubKey, nAmount));
}
+ CRITICAL_BLOCK(cs_main)
CRITICAL_BLOCK(cs_mapWallet)
{
// Check funds
@@ -1135,8 +1150,11 @@ Value listaccounts(const Array& params, bool fHelp)
CRITICAL_BLOCK(cs_mapWallet)
CRITICAL_BLOCK(cs_mapAddressBook)
{
- foreach(const PAIRTYPE(string, string)& entry, mapAddressBook)
- mapAccountBalances[entry.second] = 0;
+ foreach(const PAIRTYPE(string, string)& entry, mapAddressBook) {
+ uint160 hash160;
+ if(AddressToHash160(entry.first, hash160) && mapPubKeys.count(hash160)) // This address belongs to me
+ mapAccountBalances[entry.second] = 0;
+ }
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
{
@@ -1468,7 +1486,7 @@ string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeader
string rfc1123Time()
{
- char buffer[32];
+ char buffer[64];
time_t now;
time(&now);
struct tm* now_gmt = gmtime(&now);
diff --git a/ui.cpp b/ui.cpp
index fafd3893c8..45e07d16ea 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -1665,6 +1665,10 @@ COptionsDialog::COptionsDialog(wxWindow* parent) : COptionsDialogBase(parent)
m_checkBoxStartOnSystemStartup->SetValue(fTmpStartOnSystemStartup = GetStartOnSystemStartup());
m_checkBoxMinimizeToTray->SetValue(fMinimizeToTray);
m_checkBoxMinimizeOnClose->SetValue(fMinimizeOnClose);
+ if (fHaveUPnP)
+ m_checkBoxUseUPnP->SetValue(fUseUPnP);
+ else
+ m_checkBoxUseUPnP->Enable(false);
m_checkBoxUseProxy->SetValue(fUseProxy);
m_textCtrlProxyIP->Enable(fUseProxy);
m_textCtrlProxyPort->Enable(fUseProxy);
@@ -1784,6 +1788,13 @@ void COptionsDialog::OnButtonApply(wxCommandEvent& event)
walletdb.WriteSetting("fMinimizeOnClose", fMinimizeOnClose);
}
+ if (fHaveUPnP && fUseUPnP != m_checkBoxUseUPnP->GetValue())
+ {
+ fUseUPnP = m_checkBoxUseUPnP->GetValue();
+ walletdb.WriteSetting("fUseUPnP", fUseUPnP);
+ MapPort(fUseUPnP);
+ }
+
fUseProxy = m_checkBoxUseProxy->GetValue();
walletdb.WriteSetting("fUseProxy", fUseProxy);
@@ -1934,20 +1945,23 @@ void CSendDialog::OnButtonSend(wxCommandEvent& event)
if (fBitcoinAddress)
{
- // Send to bitcoin address
- CScript scriptPubKey;
- scriptPubKey << OP_DUP << OP_HASH160 << hash160 << OP_EQUALVERIFY << OP_CHECKSIG;
-
- string strError = SendMoney(scriptPubKey, nValue, wtx, true);
- if (strError == "")
- wxMessageBox(_("Payment sent "), _("Sending..."));
- else if (strError == "ABORTED")
- return; // leave send dialog open
- else
- {
- wxMessageBox(strError + " ", _("Sending..."));
- EndModal(false);
- }
+ CRITICAL_BLOCK(cs_main)
+ {
+ // Send to bitcoin address
+ CScript scriptPubKey;
+ scriptPubKey << OP_DUP << OP_HASH160 << hash160 << OP_EQUALVERIFY << OP_CHECKSIG;
+
+ string strError = SendMoney(scriptPubKey, nValue, wtx, true);
+ if (strError == "")
+ wxMessageBox(_("Payment sent "), _("Sending..."));
+ else if (strError == "ABORTED")
+ return; // leave send dialog open
+ else
+ {
+ wxMessageBox(strError + " ", _("Sending..."));
+ EndModal(false);
+ }
+ }
}
else
{
@@ -2805,6 +2819,10 @@ bool CMyApp::Initialize(int& argc, wxChar** argv)
}
if (pid > 0)
pthread_exit((void*)0);
+
+ pid_t sid = setsid();
+ if (sid < 0)
+ fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
}
return true;
diff --git a/uibase.cpp b/uibase.cpp
index f3ff3bf1ef..41be5d7527 100644
--- a/uibase.cpp
+++ b/uibase.cpp
@@ -371,6 +371,9 @@ COptionsDialogBase::COptionsDialogBase( wxWindow* parent, wxWindowID id, const w
m_checkBoxMinimizeToTray = new wxCheckBox( m_panelMain, wxID_ANY, _("&Minimize to the tray instead of the taskbar"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_checkBoxMinimizeToTray, 0, wxALL, 5 );
+ m_checkBoxUseUPnP = new wxCheckBox( m_panelMain, wxID_ANY, _("Map port using &UPnP"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer69->Add( m_checkBoxUseUPnP, 0, wxALL, 5 );
+
m_checkBoxMinimizeOnClose = new wxCheckBox( m_panelMain, wxID_ANY, _("M&inimize to the tray on close"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer69->Add( m_checkBoxMinimizeOnClose, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
@@ -544,7 +547,7 @@ CAboutDialogBase::CAboutDialogBase( wxWindow* parent, wxWindowID id, const wxStr
bSizer631->Add( 0, 4, 0, wxEXPAND, 5 );
- m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2011 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com)."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextMain = new wxStaticText( this, wxID_ANY, _("Copyright (c) 2009-2011 Bitcoin Developers\n\nThis is experimental software.\n\nDistributed under the MIT/X11 software license, see the accompanying file \nlicense.txt or http://www.opensource.org/licenses/mit-license.php.\n\nThis product includes software developed by the OpenSSL Project for use in the \nOpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by \nEric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextMain->Wrap( -1 );
bSizer631->Add( m_staticTextMain, 0, wxALL, 5 );
diff --git a/uibase.h b/uibase.h
index eff5bd6bf4..c5da8f5081 100644
--- a/uibase.h
+++ b/uibase.h
@@ -170,6 +170,7 @@ class COptionsDialogBase : public wxDialog
wxStaticText* m_staticText35;
wxCheckBox* m_checkBoxStartOnSystemStartup;
wxCheckBox* m_checkBoxMinimizeToTray;
+ wxCheckBox* m_checkBoxUseUPnP;
wxCheckBox* m_checkBoxMinimizeOnClose;
wxCheckBox* m_checkBoxUseProxy;
diff --git a/uiproject.fbp b/uiproject.fbp
index f54fdc2ba2..d55566eefc 100644
--- a/uiproject.fbp
+++ b/uiproject.fbp
@@ -2124,6 +2124,62 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxCheckBox" expanded="1">
+ <property name="bg"></property>
+ <property name="checked">0</property>
+ <property name="context_help"></property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Map port using &amp;UPnP</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">m_checkBoxUseUPnP</property>
+ <property name="permission">protected</property>
+ <property name="pos"></property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnCheckBox"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
@@ -3345,7 +3401,7 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
- <property name="label">Copyright (c) 2009-2011 Bitcoin Developers&#x0A;&#x0A;This is experimental software.&#x0A;&#x0A;Distributed under the MIT/X11 software license, see the accompanying file &#x0A;license.txt or http://www.opensource.org/licenses/mit-license.php.&#x0A;&#x0A;This product includes software developed by the OpenSSL Project for use in the &#x0A;OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by &#x0A;Eric Young (eay@cryptsoft.com).</property>
+ <property name="label">Copyright (c) 2009-2011 Bitcoin Developers&#x0A;&#x0A;This is experimental software.&#x0A;&#x0A;Distributed under the MIT/X11 software license, see the accompanying file &#x0A;license.txt or http://www.opensource.org/licenses/mit-license.php.&#x0A;&#x0A;This product includes software developed by the OpenSSL Project for use in the &#x0A;OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by &#x0A;Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticTextMain</property>