mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-24 09:04:00 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5681bb121 | ||
|
|
bed005b639 | ||
|
|
f93d5f9ffe | ||
|
|
2ca1758832 | ||
|
|
1da44d2e96 | ||
|
|
42605ce8bc | ||
|
|
124baa4ccb |
209
build-osx.txt
Normal file
209
build-osx.txt
Normal file
@@ -0,0 +1,209 @@
|
||||
Mac OS X build instructions
|
||||
Laszlo Hanyecz (solar@heliacal.net)
|
||||
|
||||
|
||||
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
|
||||
|
||||
All of the commands should be executed in Terminal.app.. it's in
|
||||
/Applications/Utilities
|
||||
|
||||
You need to install XCode with all the options checked so that the compiler
|
||||
and everything is available in /usr not just /Developer
|
||||
I think it comes on the DVD but you can get the current version from
|
||||
http://developer.apple.com
|
||||
|
||||
|
||||
1. Pick a directory to work inside.. something like ~/bitcoin works. The
|
||||
structure I use looks like this:
|
||||
(~ is your home directory)
|
||||
|
||||
~/bitcoin
|
||||
~/bitcoin/trunk # source code
|
||||
~/bitcoin/deps # dependencies.. like libraries and headers needed to compile
|
||||
~/bitcoin/Bitcoin.app # the application bundle where you can run the app
|
||||
|
||||
Just execute: mkdir ~/bitcoin
|
||||
This will create the top dir for you..
|
||||
|
||||
WARNING: do not use the ~ notation with the configure scripts.. use the full
|
||||
name of the directory, for example /Users/james/bitcoin/deps for a user named
|
||||
'james'. In my examples I am using 'macosuser' so make sure you change that.
|
||||
|
||||
2. Check out the trunk version of the bitcoin code from subversion:
|
||||
|
||||
cd ~/bitcoin
|
||||
svn checkout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk
|
||||
|
||||
This will make ~/bitcoin/trunk for you with all the files from subversion.
|
||||
|
||||
3. Get and build the dependencies
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
|
||||
Download from http://www.boost.org/users/download/
|
||||
I'm assuming it ended up in ~/Downloads..
|
||||
|
||||
mkdir ~/bitcoin/deps
|
||||
cd ~/bitcoin/deps
|
||||
tar xvjf ~/Downloads/boost_1_42_0.tar.bz2
|
||||
cd boost_1_42_0
|
||||
./bootstrap.sh
|
||||
./bjam architecture=combined address-model=32_64 macosx-version=10.6 macosx-version-min=10.5 link=static runtime-link=static --toolset=darwin --prefix=/Users/macosuser/bitcoin/deps install
|
||||
|
||||
This part takes a while.. use your judgement and fix it if something doesn't
|
||||
build for some reason.
|
||||
|
||||
Change the prefix to whatever your directory is (my username in this example
|
||||
is macosuser). I'm also running on 10.6 so i have macosx-version=10.6 change
|
||||
to 10.5 if you're using leopard.
|
||||
|
||||
This is what my output looked like at the end:
|
||||
...failed updating 2 targets...
|
||||
...skipped 144 targets...
|
||||
...updated 8074 targets...
|
||||
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
|
||||
Download from http://www.openssl.org/source/
|
||||
|
||||
We would like to build this as a 32 bit/64 bit library so we actually build it
|
||||
2 times and join it together here.. If you downloaded with safari it already
|
||||
uncompressed it so it will just be a tar not a tar.gz
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-i386
|
||||
tar xvf ~/Downloads/openssl-1.0.0.tar
|
||||
mv openssl-1.0.0 openssl-1.0.0-x86_64
|
||||
# build i386 (32 bit intel) binary
|
||||
cd openssl-1.0.0-i386
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin-i386-cc && make
|
||||
make install # only do this on one of the architectures, to install the headers
|
||||
cd ..
|
||||
# build x86_64 (64 bit intel) binary
|
||||
cd openssl-1.0.0-x86_64
|
||||
./Configure --prefix=/Users/macosuser/bitcoin/deps --openssldir=/Users/macosuser/deps/openssl darwin64-x86_64-cc && make
|
||||
cd ..
|
||||
|
||||
# combine the libs
|
||||
cd ~/bitcoin/deps
|
||||
lipo -arch i386 openssl-1.0.0-i386/libcrypto.a -arch x86_64 openssl-1.0.0-x86_64/libcrypto.a -o lib/libcrypto.a -create
|
||||
lipo -arch i386 openssl-1.0.0-i386/libssl.a -arch x86_64 openssl-1.0.0-x86_64/libssl.a -o lib/libssl.a -create
|
||||
|
||||
Verify your binaries
|
||||
|
||||
file lib/libcrypto.a
|
||||
|
||||
output should look like this:
|
||||
|
||||
ib/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
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
|
||||
Download from http://freshmeat.net/projects/berkeleydb/
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
tar xvf ~/Downloads/db-4.8.26.tar
|
||||
cd db-4.8.26/build_unix
|
||||
../dist/configure --prefix=/Users/macosuser/bitcoin/deps --enable-cxx && make && make install
|
||||
|
||||
|
||||
wxWidgets
|
||||
---------
|
||||
|
||||
This is the big one..
|
||||
|
||||
Check it out from svn
|
||||
|
||||
cd ~/bitcoin/deps
|
||||
svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk
|
||||
|
||||
This will make a wxWidgets-trunk directory in deps.
|
||||
|
||||
Use this script snippet, change your prefix to whatever your dir is:
|
||||
|
||||
PREFIX=~/bitcoin/deps
|
||||
SRCDIR="$PREFIX/wxWidgets-trunk"
|
||||
BUILDDIR="$SRCDIR/macbuild"
|
||||
|
||||
cd "$PREFIX" &&
|
||||
#svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets-trunk &&
|
||||
cd "$SRCDIR" &&
|
||||
|
||||
[ -f include/wx/hashmap.h.orig ] || cp include/wx/hashmap.h include/wx/hashmap.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashmap.h.orig > include/wx/hashmap.h &&
|
||||
|
||||
[ -f include/wx/hashset.h.orig ] || cp include/wx/hashset.h include/wx/hashset.h.orig &&
|
||||
sed 's/if wxUSE_STL/if 0 \&\& wxUSE_STL/g' < include/wx/hashset.h.orig > include/wx/hashset.h &&
|
||||
|
||||
|
||||
|
||||
rm -vrf "$BUILDDIR" &&
|
||||
mkdir "$BUILDDIR" &&
|
||||
cd "$BUILDDIR" &&
|
||||
|
||||
../configure --prefix="$PREFIX" \
|
||||
--with-osx_cocoa \
|
||||
--disable-shared \
|
||||
--disable-debug_flag \
|
||||
--with-macosx-version-min=10.5 \
|
||||
--enable-stl \
|
||||
--enable-utf8 \
|
||||
--enable-universal_binary \
|
||||
--with-libjpeg=builtin \
|
||||
--with-libpng=builtin \
|
||||
--with-regex=builtin \
|
||||
--with-libtiff=builtin \
|
||||
--with-zlib=builtin \
|
||||
--with-expat=builtin \
|
||||
--with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk &&
|
||||
|
||||
|
||||
find . -name Makefile |
|
||||
while read i; do
|
||||
echo $i;
|
||||
sed 's/-arch i386/-arch i386 -arch x86_64/g' < "$i" > "$i".new &&
|
||||
mv "$i" "$i".old &&
|
||||
mv "$i".new "$i";
|
||||
done
|
||||
|
||||
|
||||
|
||||
make &&
|
||||
make install
|
||||
|
||||
|
||||
|
||||
Now you should be able to build bitcoin
|
||||
|
||||
cd ~/bitcoin/trunk
|
||||
make -f makefile.osx bitcoin
|
||||
|
||||
Before you can run it, you need to create an application bundle for Mac OS.
|
||||
Create the directories in terminal using mkdir and copy the files into place.
|
||||
They are available at http://heliacal.net/~solar/bitcoin/mac-build/
|
||||
You need the Info.plist and the .ins file. The Contents/MacOS/bitcoin file is
|
||||
the output of the build.
|
||||
Your directory structure should look like this:
|
||||
|
||||
Bitcoin.app
|
||||
Bitcoin.app/Contents
|
||||
Bitcoin.app/Contents/Info.plist
|
||||
Bitcoin.app/Contents/MacOS
|
||||
Bitcoin.app/Contents/MacOS/bitcoin
|
||||
Bitcoin.app/Contents/Resources
|
||||
Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
|
||||
|
||||
To run it you can just click the Bitcoin.app in Finder, or just do open
|
||||
~/bitcoin/Bitcoin.app
|
||||
If you want to run it with arguments you can just run it without backgrounding
|
||||
by specifying the full name in terminal:
|
||||
~/bitcoin/Bitcoin.app/Contents/MacOS/bitcoin -addnode=192.75.207.66
|
||||
9
db.cpp
9
db.cpp
@@ -511,9 +511,9 @@ bool LoadAddresses()
|
||||
// CWalletDB
|
||||
//
|
||||
|
||||
bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
|
||||
bool CWalletDB::LoadWallet()
|
||||
{
|
||||
vchDefaultKeyRet.clear();
|
||||
vchDefaultKey.clear();
|
||||
int nFileVersion = 0;
|
||||
|
||||
// Modify defaults
|
||||
@@ -587,7 +587,7 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
|
||||
}
|
||||
else if (strType == "defaultkey")
|
||||
{
|
||||
ssValue >> vchDefaultKeyRet;
|
||||
ssValue >> vchDefaultKey;
|
||||
}
|
||||
else if (strType == "version")
|
||||
{
|
||||
@@ -650,8 +650,7 @@ bool CWalletDB::LoadWallet(vector<unsigned char>& vchDefaultKeyRet)
|
||||
bool LoadWallet(bool& fFirstRunRet)
|
||||
{
|
||||
fFirstRunRet = false;
|
||||
vector<unsigned char> vchDefaultKey;
|
||||
if (!CWalletDB("cr+").LoadWallet(vchDefaultKey))
|
||||
if (!CWalletDB("cr+").LoadWallet())
|
||||
return false;
|
||||
fFirstRunRet = vchDefaultKey.empty();
|
||||
|
||||
|
||||
7
db.h
7
db.h
@@ -14,9 +14,11 @@ class CWalletTx;
|
||||
|
||||
extern map<string, string> mapAddressBook;
|
||||
extern CCriticalSection cs_mapAddressBook;
|
||||
extern vector<unsigned char> vchDefaultKey;
|
||||
extern bool fClient;
|
||||
|
||||
|
||||
|
||||
extern unsigned int nWalletDBUpdated;
|
||||
extern DbEnv dbenv;
|
||||
|
||||
@@ -328,6 +330,8 @@ public:
|
||||
|
||||
bool EraseName(const string& strAddress)
|
||||
{
|
||||
// This should only be used for sending addresses, never for receiving addresses,
|
||||
// receiving addresses must always have an address book entry if they're not change return.
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
mapAddressBook.erase(strAddress);
|
||||
nWalletDBUpdated++;
|
||||
@@ -371,6 +375,7 @@ public:
|
||||
|
||||
bool WriteDefaultKey(const vector<unsigned char>& vchPubKey)
|
||||
{
|
||||
vchDefaultKey = vchPubKey;
|
||||
nWalletDBUpdated++;
|
||||
return Write(string("defaultkey"), vchPubKey);
|
||||
}
|
||||
@@ -388,7 +393,7 @@ public:
|
||||
return Write(make_pair(string("setting"), strKey), value);
|
||||
}
|
||||
|
||||
bool LoadWallet(vector<unsigned char>& vchDefaultKeyRet);
|
||||
bool LoadWallet();
|
||||
};
|
||||
|
||||
bool LoadWallet(bool& fFirstRunRet);
|
||||
|
||||
38
init.cpp
38
init.cpp
@@ -224,9 +224,6 @@ bool CMyApp::Initialize(int& argc, wxChar** argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (fDaemon)
|
||||
fprintf(stdout, "bitcoin server starting\n");
|
||||
|
||||
#ifdef __WXGTK__
|
||||
if (fDaemon || fCommandLine)
|
||||
{
|
||||
@@ -342,22 +339,27 @@ bool CMyApp::OnInit2()
|
||||
if (mapArgs.count("-?") || mapArgs.count("--help"))
|
||||
{
|
||||
wxString strUsage = string() +
|
||||
_("Usage: bitcoin [options]") + "\t\t\t\t\t\t\n" +
|
||||
_("Options:\n") +
|
||||
" -gen \t\t " + _("Generate coins\n") +
|
||||
" -gen=0 \t\t " + _("Don't generate coins\n") +
|
||||
" -min \t\t " + _("Start minimized\n") +
|
||||
" -datadir=<dir> \t " + _("Specify data directory\n") +
|
||||
" -proxy=<ip:port>\t " + _("Connect through socks4 proxy\n") +
|
||||
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
|
||||
" -connect=<ip> \t " + _("Connect only to the specified node\n") +
|
||||
" -? \t\t " + _("This help message\n");
|
||||
_("Usage:") + "\t\t\t\t\t\t\t\t\t\t\n" +
|
||||
" bitcoin [options] \t" + "\n" +
|
||||
" bitcoin [command] \t" + _("Send command to bitcoin running with -server or -daemon\n") +
|
||||
" bitcoin [command] -? \t" + _("Get help for a command\n") +
|
||||
" bitcoin help \t" + _("List commands\n") +
|
||||
_("Options:\n") +
|
||||
" -gen \t " + _("Generate coins\n") +
|
||||
" -gen=0 \t " + _("Don't generate coins\n") +
|
||||
" -min \t " + _("Start minimized\n") +
|
||||
" -datadir=<dir> \t " + _("Specify data directory\n") +
|
||||
" -proxy=<ip:port>\t " + _("Connect through socks4 proxy\n") +
|
||||
" -addnode=<ip> \t " + _("Add a node to connect to\n") +
|
||||
" -connect=<ip> \t " + _("Connect only to the specified node\n") +
|
||||
" -server \t " + _("Accept command line and JSON-RPC commands\n") +
|
||||
" -daemon \t " + _("Run in the background as a daemon and accept commands\n") +
|
||||
" -? \t " + _("This help message\n");
|
||||
|
||||
|
||||
if (fWindows && fGUI)
|
||||
{
|
||||
// Remove spaces, the tabs make the columns line up in the message box
|
||||
for (int i = 0; i < 50; i++)
|
||||
strUsage.Replace(" \t", "\t");
|
||||
// Tabs make the columns line up in the message box
|
||||
wxMessageBox(strUsage, "Bitcoin", wxOK);
|
||||
}
|
||||
else
|
||||
@@ -447,7 +449,8 @@ bool CMyApp::OnInit2()
|
||||
//
|
||||
// Load data files
|
||||
//
|
||||
bool fFirstRun;
|
||||
if (fDaemon)
|
||||
fprintf(stdout, "bitcoin server starting\n");
|
||||
strErrors = "";
|
||||
int64 nStart;
|
||||
|
||||
@@ -465,6 +468,7 @@ bool CMyApp::OnInit2()
|
||||
|
||||
printf("Loading wallet...\n");
|
||||
nStart = GetTimeMillis();
|
||||
bool fFirstRun;
|
||||
if (!LoadWallet(fFirstRun))
|
||||
strErrors += _("Error loading wallet.dat \n");
|
||||
printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart);
|
||||
|
||||
1
irc.cpp
1
irc.cpp
@@ -159,7 +159,6 @@ bool Wait(int nSeconds)
|
||||
void ThreadIRCSeed(void* parg)
|
||||
{
|
||||
printf("ThreadIRCSeed started\n");
|
||||
SetThreadPriority(THREAD_PRIORITY_NORMAL);
|
||||
int nErrorWait = 10;
|
||||
int nRetryWait = 10;
|
||||
bool fNameInUse = false;
|
||||
|
||||
BIN
locale/it/LC_MESSAGES/bitcoin.mo
Normal file
BIN
locale/it/LC_MESSAGES/bitcoin.mo
Normal file
Binary file not shown.
806
locale/it/LC_MESSAGES/bitcoin.po
Normal file
806
locale/it/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,806 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
|
||||
"PO-Revision-Date: 2010-05-27 13:01+0100\n"
|
||||
"Last-Translator: Franco Cimatti <hostfat@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../init.cpp:342
|
||||
msgid "Usage: bitcoin [options]"
|
||||
msgstr "Uso: bitcoin [options]"
|
||||
|
||||
#: ../../../init.cpp:343
|
||||
msgid "Options:\n"
|
||||
msgstr "Opzioni:\n"
|
||||
|
||||
#: ../../../init.cpp:344
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Genera monete\n"
|
||||
|
||||
#: ../../../init.cpp:345
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Non generare monete\n"
|
||||
|
||||
#: ../../../init.cpp:346
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Avvia minimizzato\n"
|
||||
|
||||
#: ../../../init.cpp:347
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Indica la cartella per i dati\n"
|
||||
|
||||
#: ../../../init.cpp:348
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
msgstr "Connetti attraverso proxy socks4\n"
|
||||
|
||||
#: ../../../init.cpp:349
|
||||
msgid "Add a node to connect to\n"
|
||||
msgstr "Aggiungi un nodo a cui connetterti\n"
|
||||
|
||||
#: ../../../init.cpp:350
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Impossibile connettersi al nodo specificato\n"
|
||||
|
||||
#: ../../../init.cpp:351
|
||||
msgid "This help message\n"
|
||||
msgstr "Questo messaggio di aiuto\n"
|
||||
|
||||
#: ../../../init.cpp:455
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Errore nel caricare addr.dat \n"
|
||||
|
||||
#: ../../../init.cpp:461
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Errore nel caricare blkindex.dat \n"
|
||||
|
||||
#: ../../../init.cpp:468
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Errore nel caricare wallet.dat \n"
|
||||
|
||||
#: ../../../init.cpp:536
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Indirizzo proxy non valido"
|
||||
|
||||
#: ../../../init.cpp:629
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Il programma è crashato e sarà terminato. "
|
||||
|
||||
#: ../../../main.cpp:1465
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Attenzione: c'è poco spazio sul disco "
|
||||
|
||||
#: ../../../main.cpp:2994
|
||||
#, c-format
|
||||
msgid "Error: This is an oversized transaction that requires a transaction fee of %s "
|
||||
msgstr "Errore: Questa è un operazione fuoriscala che richiede un sovrapprezzo di %s "
|
||||
|
||||
#: ../../../main.cpp:2996
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Errore: La creazione del trasferimento è fallito "
|
||||
|
||||
#: ../../../main.cpp:3001
|
||||
#: ../../../ui.cpp:1761
|
||||
#: ../../../ui.cpp:1763
|
||||
#: ../../../ui.cpp:1904
|
||||
#: ../../../ui.cpp:2053
|
||||
msgid "Sending..."
|
||||
msgstr "Inviando..."
|
||||
|
||||
#: ../../../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 "Errore: Il trasferimento è stato respinto. Questo può accadere se alcune delle monete nel tuo portafoglio erano già state spese, o anche se hai usato una copia di wallet.dat e le monete erano già state spese nella copia originale ma non segnate in quest'ultima."
|
||||
|
||||
#: ../../../main.cpp:3017
|
||||
msgid "Invalid amount"
|
||||
msgstr "Quantità non valida"
|
||||
|
||||
#: ../../../main.cpp:3019
|
||||
#: ../../../ui.cpp:1971
|
||||
#: ../../../ui.cpp:2038
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Fondi insufficenti"
|
||||
|
||||
#: ../../../main.cpp:3024
|
||||
msgid "Invalid bitcoin address"
|
||||
msgstr "Indirizzo bitcoin non valido"
|
||||
|
||||
#: ../../../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 "Questo trasferimento è oltre le dimensioni massime. Puoi comunque inviarlo per un costo aggiuntivo di %s, che andrà ai nodi che effettueranno il processo della tua operazione e che supportano il network. Vuoi pagare il costo aggiuntivo?"
|
||||
|
||||
#: ../../../ui.cpp:285
|
||||
msgid "Status"
|
||||
msgstr "Stato"
|
||||
|
||||
#: ../../../ui.cpp:286
|
||||
msgid "Date"
|
||||
msgstr "Data"
|
||||
|
||||
#: ../../../ui.cpp:287
|
||||
msgid "Description"
|
||||
msgstr "Descrizione"
|
||||
|
||||
#: ../../../ui.cpp:288
|
||||
msgid "Debit"
|
||||
msgstr "Debito"
|
||||
|
||||
#: ../../../ui.cpp:289
|
||||
msgid "Credit"
|
||||
msgstr "Credito"
|
||||
|
||||
#: ../../../ui.cpp:489
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Aperto per %d blocchi"
|
||||
|
||||
#: ../../../ui.cpp:491
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Aperto fino a %s"
|
||||
|
||||
#: ../../../ui.cpp:497
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/fuorilinea?"
|
||||
|
||||
#: ../../../ui.cpp:499
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/non confermato"
|
||||
|
||||
#: ../../../ui.cpp:501
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d conferme"
|
||||
|
||||
#: ../../../ui.cpp:584
|
||||
msgid "Generated"
|
||||
msgstr "Generato"
|
||||
|
||||
#: ../../../ui.cpp:592
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Generate (%s matureranno in %d altri blocchi)"
|
||||
|
||||
#: ../../../ui.cpp:596
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Generato - Attenzione: Questo blocco non è stato ricevuto da nessun altro nodo e probabilmente non sarà accettato!"
|
||||
|
||||
#: ../../../ui.cpp:600
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Generato (non accettato)"
|
||||
|
||||
#: ../../../ui.cpp:610
|
||||
msgid "From: "
|
||||
msgstr "Da: "
|
||||
|
||||
#: ../../../ui.cpp:634
|
||||
msgid "From: unknown, Received with: "
|
||||
msgstr "Da: sconosciuto, Ricevuto con: "
|
||||
|
||||
#: ../../../ui.cpp:676
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Pagamento a te stesso"
|
||||
|
||||
#: ../../../ui.cpp:713
|
||||
msgid "To: "
|
||||
msgstr "A: "
|
||||
|
||||
#: ../../../ui.cpp:1009
|
||||
msgid " Generating"
|
||||
msgstr " Generando"
|
||||
|
||||
#: ../../../ui.cpp:1011
|
||||
msgid "(not connected)"
|
||||
msgstr "(non connesso)"
|
||||
|
||||
#: ../../../ui.cpp:1014
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d connessioni %d blocchi %d trasferimenti"
|
||||
|
||||
#: ../../../ui.cpp:1123
|
||||
#: ../../../ui.cpp:2351
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Nuovo indirizzo ricevente"
|
||||
|
||||
#: ../../../ui.cpp:1124
|
||||
#: ../../../ui.cpp:2352
|
||||
msgid ""
|
||||
"It's good policy to use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"E' una buona abitudine usare un nuovo indirizzo per ogni pagamento che ricevuto.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
|
||||
#: ../../../ui.cpp:1193
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Stato:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1198
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", non è ancora stato diffuso correttamente"
|
||||
|
||||
#: ../../../ui.cpp:1200
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", diffusione attraverso %d nodo"
|
||||
|
||||
#: ../../../ui.cpp:1202
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", diffusione attraverso %d nodi"
|
||||
|
||||
#: ../../../ui.cpp:1206
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Data:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1214
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Sorgente:</b> Generato<br>"
|
||||
|
||||
#: ../../../ui.cpp:1220
|
||||
#: ../../../ui.cpp:1238
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Da:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1238
|
||||
msgid "unknown"
|
||||
msgstr "sconoscuto"
|
||||
|
||||
#: ../../../ui.cpp:1239
|
||||
#: ../../../ui.cpp:1263
|
||||
#: ../../../ui.cpp:1322
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>A:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1242
|
||||
msgid " (yours, label: "
|
||||
msgstr " (vostro, label: "
|
||||
|
||||
#: ../../../ui.cpp:1244
|
||||
msgid " (yours)"
|
||||
msgstr " (vostro)"
|
||||
|
||||
#: ../../../ui.cpp:1281
|
||||
#: ../../../ui.cpp:1293
|
||||
#: ../../../ui.cpp:1356
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr "<b>Credito:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1283
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s matureranno in %d altri blocchi)"
|
||||
|
||||
#: ../../../ui.cpp:1285
|
||||
msgid "(not accepted)"
|
||||
msgstr "(non accettato)"
|
||||
|
||||
#: ../../../ui.cpp:1330
|
||||
#: ../../../ui.cpp:1353
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr "<b>Debito:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1344
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Trasferimento costo:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1360
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Quantità del network:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1367
|
||||
msgid "Message:"
|
||||
msgstr "Messaggio:"
|
||||
|
||||
#: ../../../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 "Le monete generate devono aspettare 120 blocchi prima di poter essere spese. Quando hai generato questo blocco, è stato diffuso sul network per essere aggiunto alla catena dei blocchi. Se fallirà l'entrata nella catena, cambierà in \"non accettato\" e non spendibile. Questo può capitare se un altro nodo genera un blocco pochi secondi prima del tuo."
|
||||
|
||||
#: ../../../ui.cpp:1437
|
||||
msgid "Main"
|
||||
msgstr "Principale"
|
||||
|
||||
#: ../../../ui.cpp:1442
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Minimizza se chiuso"
|
||||
|
||||
#: ../../../ui.cpp:1595
|
||||
#, c-format
|
||||
msgid "version 0.%d.%d beta"
|
||||
msgstr "versione 0.%d.%d beta"
|
||||
|
||||
#: ../../../ui.cpp:1681
|
||||
msgid "Will appear as \"From: Unknown\""
|
||||
msgstr "Apparirà come \"Da: Sconosciuto\""
|
||||
|
||||
#: ../../../ui.cpp:1682
|
||||
msgid "Can't include a message when sending to a Bitcoin address"
|
||||
msgstr "Non si può includere un messaggio quando si invia attraverso l'indirizzo Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:1735
|
||||
msgid "Error in amount "
|
||||
msgstr "Errore nell'ammontare "
|
||||
|
||||
#: ../../../ui.cpp:1735
|
||||
#: ../../../ui.cpp:1740
|
||||
#: ../../../ui.cpp:1745
|
||||
#: ../../../ui.cpp:1771
|
||||
#: ../../../uibase.cpp:61
|
||||
msgid "Send Coins"
|
||||
msgstr "Invia monete"
|
||||
|
||||
#: ../../../ui.cpp:1740
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "L'ammontare è andato oltre i tuoi capitali "
|
||||
|
||||
#: ../../../ui.cpp:1745
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Il totale va oltre i tuoi capitali quando il "
|
||||
|
||||
#: ../../../ui.cpp:1745
|
||||
msgid " transaction fee is included "
|
||||
msgstr " il costo trasferimento è incluso "
|
||||
|
||||
#: ../../../ui.cpp:1761
|
||||
msgid "Payment sent "
|
||||
msgstr "Pagamento inviato "
|
||||
|
||||
#: ../../../ui.cpp:1771
|
||||
msgid "Invalid address "
|
||||
msgstr "Indirizzo non valido "
|
||||
|
||||
#: ../../../ui.cpp:1825
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Inviando %s a %s"
|
||||
|
||||
#: ../../../ui.cpp:1898
|
||||
#: ../../../ui.cpp:1931
|
||||
msgid "CANCELLED"
|
||||
msgstr "CANCELLATO"
|
||||
|
||||
#: ../../../ui.cpp:1902
|
||||
msgid "Cancelled"
|
||||
msgstr "Cancellato"
|
||||
|
||||
#: ../../../ui.cpp:1904
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Operazione cancellata "
|
||||
|
||||
#: ../../../ui.cpp:1957
|
||||
msgid "Error: "
|
||||
msgstr "Errore: "
|
||||
|
||||
#: ../../../ui.cpp:1976
|
||||
msgid "Connecting..."
|
||||
msgstr "Connessione in corso..."
|
||||
|
||||
#: ../../../ui.cpp:1981
|
||||
msgid "Unable to connect"
|
||||
msgstr "Impossibile connettersi"
|
||||
|
||||
#: ../../../ui.cpp:1986
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Richiesta chiave pubblica..."
|
||||
|
||||
#: ../../../ui.cpp:1998
|
||||
msgid "Received public key..."
|
||||
msgstr "Ricezione chiave pubblica..."
|
||||
|
||||
#: ../../../ui.cpp:2010
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Trasferimento non accettato"
|
||||
|
||||
#: ../../../ui.cpp:2019
|
||||
msgid "Invalid response received"
|
||||
msgstr "Risposta non valida ricevuta"
|
||||
|
||||
#: ../../../ui.cpp:2034
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Creazione trasferimento..."
|
||||
|
||||
#: ../../../ui.cpp:2046
|
||||
#, c-format
|
||||
msgid "This is an oversized transaction that requires a transaction fee of %s"
|
||||
msgstr "Questo è un trasferimento fuoriscala che richiede un costo aggiuntivo di %s"
|
||||
|
||||
#: ../../../ui.cpp:2048
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Creazione trasferimento fallita"
|
||||
|
||||
#: ../../../ui.cpp:2055
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Trasferimento bloccato"
|
||||
|
||||
#: ../../../ui.cpp:2063
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Connessione persa, trasferimento cancellato"
|
||||
|
||||
#: ../../../ui.cpp:2079
|
||||
msgid "Sending payment..."
|
||||
msgstr "Inviando pagamento..."
|
||||
|
||||
#: ../../../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 "Il trasferimento è stato respinto. Questo può accadere se alcune delle monete nel tuo portafoglio erano già state spese, o anche se hai usato una copia di wallet.dat e le monete erano già state spese nella copia originale ma non segnate in quest'ultima."
|
||||
|
||||
#: ../../../ui.cpp:2092
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "In attesa di conferma..."
|
||||
|
||||
#: ../../../ui.cpp:2110
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"The transaction is recorded and will credit to the recipient,\n"
|
||||
"but the comment information will be blank."
|
||||
msgstr ""
|
||||
"Il pagamento è inviato, ma il ricevente non è stato in grado di verificarlo.\n"
|
||||
"Il trasferimento è registrato e costerà sarà accreditato al ricevente,\n"
|
||||
"ma il commento verrà mostrato come vuoto."
|
||||
|
||||
#: ../../../ui.cpp:2119
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Il pagamento è stato inviato, ma è arrivata un risposta invalida"
|
||||
|
||||
#: ../../../ui.cpp:2125
|
||||
msgid "Payment completed"
|
||||
msgstr "Pagamento completato"
|
||||
|
||||
#: ../../../ui.cpp:2156
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2339
|
||||
msgid "Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#: ../../../ui.cpp:2157
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2339
|
||||
msgid "Address"
|
||||
msgstr "Indirizzo"
|
||||
|
||||
#: ../../../ui.cpp:2159
|
||||
#: ../../../ui.cpp:2314
|
||||
msgid "Label"
|
||||
msgstr "Label"
|
||||
|
||||
#: ../../../ui.cpp:2160
|
||||
#: ../../../uibase.cpp:908
|
||||
msgid "Bitcoin Address"
|
||||
msgstr "Indirizzo Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2284
|
||||
msgid "This is one of your own addresses for receiving payments and cannot be entered in the address book. "
|
||||
msgstr "Questo qui è uno dei tuoi indirizzi personali per ricevere pagamenti e non può essere inserito nella rubrica indirizzi. "
|
||||
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2308
|
||||
msgid "Edit Address"
|
||||
msgstr "Modifica indirizzo"
|
||||
|
||||
#: ../../../ui.cpp:2314
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Modifica spazio indirizzo"
|
||||
|
||||
#: ../../../ui.cpp:2339
|
||||
#: ../../../ui.cpp:2345
|
||||
msgid "Add Address"
|
||||
msgstr "Aggiungi indirizzo"
|
||||
|
||||
#: ../../../ui.cpp:2421
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2423
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Generando"
|
||||
|
||||
#: ../../../ui.cpp:2425
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (non connesso)"
|
||||
|
||||
#: ../../../ui.cpp:2500
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Apri Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2501
|
||||
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"
|
||||
msgstr "E&sci"
|
||||
|
||||
#: ../../../uibase.cpp:30
|
||||
msgid "&File"
|
||||
msgstr "&File"
|
||||
|
||||
#: ../../../uibase.cpp:38
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "&Il tuo indirizzo di ricezione..."
|
||||
|
||||
#: ../../../uibase.cpp:42
|
||||
msgid "&Options..."
|
||||
msgstr "&Opzioni..."
|
||||
|
||||
#: ../../../uibase.cpp:45
|
||||
msgid "&Settings"
|
||||
msgstr "I&mpostazioni"
|
||||
|
||||
#: ../../../uibase.cpp:49
|
||||
msgid "&About..."
|
||||
msgstr "&Info..."
|
||||
|
||||
#: ../../../uibase.cpp:52
|
||||
msgid "&Help"
|
||||
msgstr "&Aiuto"
|
||||
|
||||
#: ../../../uibase.cpp:62
|
||||
msgid "Address Book"
|
||||
msgstr "Rubrica indirizzi"
|
||||
|
||||
#: ../../../uibase.cpp:77
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Il tuo indirizzo Bitcoin:"
|
||||
|
||||
#: ../../../uibase.cpp:84
|
||||
msgid " &New... "
|
||||
msgstr " &Nuovo... "
|
||||
|
||||
#: ../../../uibase.cpp:87
|
||||
#: ../../../uibase.cpp:851
|
||||
#: ../../../uibase.cpp:954
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " &Copia nella Clipboard "
|
||||
|
||||
#: ../../../uibase.cpp:102
|
||||
msgid "Balance:"
|
||||
msgstr "Capitali:"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " All"
|
||||
msgstr " Tutte"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " Sent"
|
||||
msgstr " Inviato"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " Received"
|
||||
msgstr " Ricevuto"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " In Progress"
|
||||
msgstr " In lavorazione"
|
||||
|
||||
#: ../../../uibase.cpp:142
|
||||
msgid "All Transactions"
|
||||
msgstr "Tutte le operazioni"
|
||||
|
||||
#: ../../../uibase.cpp:153
|
||||
msgid "Sent/Received"
|
||||
msgstr "Inviato/Ricevuto"
|
||||
|
||||
#: ../../../uibase.cpp:164
|
||||
msgid "Sent"
|
||||
msgstr "Inviato"
|
||||
|
||||
#: ../../../uibase.cpp:175
|
||||
msgid "Received"
|
||||
msgstr "Ricevuto"
|
||||
|
||||
#: ../../../uibase.cpp:318
|
||||
#: ../../../uibase.cpp:479
|
||||
#: ../../../uibase.cpp:580
|
||||
#: ../../../uibase.cpp:793
|
||||
#: ../../../uibase.cpp:854
|
||||
#: ../../../uibase.cpp:963
|
||||
#: ../../../uibase.cpp:1052
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: ../../../uibase.cpp:361
|
||||
msgid "Optional transaction fee you give to the nodes that process your transactions."
|
||||
msgstr "Costo aggiuntivo opzionale che tu dai ai nodi che realizzano i tuoi trasferimenti"
|
||||
|
||||
#: ../../../uibase.cpp:370
|
||||
msgid "Transaction fee:"
|
||||
msgstr "Costo trasferimento:"
|
||||
|
||||
#: ../../../uibase.cpp:386
|
||||
msgid "&Limit coin generation to"
|
||||
msgstr "&Limita la generazione moneta a"
|
||||
|
||||
#: ../../../uibase.cpp:393
|
||||
msgid "processors"
|
||||
msgstr "processori"
|
||||
|
||||
#: ../../../uibase.cpp:399
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
msgstr "A&vvia Bitcoin all'avvio del sistema"
|
||||
|
||||
#: ../../../uibase.cpp:403
|
||||
msgid "&Minimize to the tray instead of the taskbar"
|
||||
msgstr "&Minimizza nella tray invece che nella barra"
|
||||
|
||||
#: ../../../uibase.cpp:407
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "M&inimizza nella tray alla chiusura"
|
||||
|
||||
#: ../../../uibase.cpp:414
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "%Connesso attraverso proxy socks4: "
|
||||
|
||||
#: ../../../uibase.cpp:426
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "Proxy &IP:"
|
||||
|
||||
#: ../../../uibase.cpp:434
|
||||
msgid " &Port:"
|
||||
msgstr " &Porta:"
|
||||
|
||||
#: ../../../uibase.cpp:456
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:460
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:482
|
||||
#: ../../../uibase.cpp:735
|
||||
#: ../../../uibase.cpp:798
|
||||
#: ../../../uibase.cpp:857
|
||||
#: ../../../uibase.cpp:966
|
||||
#: ../../../uibase.cpp:1055
|
||||
msgid "Cancel"
|
||||
msgstr "Cancella"
|
||||
|
||||
#: ../../../uibase.cpp:485
|
||||
msgid "&Apply"
|
||||
msgstr "&Accetta"
|
||||
|
||||
#: ../../../uibase.cpp:546
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin "
|
||||
|
||||
#: ../../../uibase.cpp:552
|
||||
msgid "version"
|
||||
msgstr "versione"
|
||||
|
||||
#: ../../../uibase.cpp:563
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"\n"
|
||||
"This is experimental software. Do not rely on it for actual financial transactions.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\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)."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"\n"
|
||||
"Questo è un software sperimentale. Non affidartici per gli attuali trasferimenti finanziari.\n"
|
||||
"\n"
|
||||
"Distribuito sotto la licenza software MIT/X11, guarda il file license.txt incluso oppure su http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\n"
|
||||
"Questo prodoto include software sviluppato dal progetto OpenSSL per l'uso del \n"
|
||||
"(http://www.openssl.org/) e il software criptografico scritto da \n"
|
||||
"Eric Young (eay@cryptsoft.com)."
|
||||
|
||||
#: ../../../uibase.cpp:619
|
||||
msgid "Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"
|
||||
msgstr "Inserisci un indirizzo Bitcoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) o un indirizzo IP (e.g. 123.45.6.7)"
|
||||
|
||||
#: ../../../uibase.cpp:633
|
||||
msgid "Pay &To:"
|
||||
msgstr "Paga %a:"
|
||||
|
||||
#: ../../../uibase.cpp:648
|
||||
msgid "&Paste"
|
||||
msgstr "&Incolla"
|
||||
|
||||
#: ../../../uibase.cpp:651
|
||||
msgid " Address &Book..."
|
||||
msgstr " &Rubrica degli indirizzi..."
|
||||
|
||||
#: ../../../uibase.cpp:658
|
||||
msgid "&Amount:"
|
||||
msgstr "&Quantità"
|
||||
|
||||
#: ../../../uibase.cpp:668
|
||||
msgid "T&ransfer:"
|
||||
msgstr "T&rasferimento:"
|
||||
|
||||
#: ../../../uibase.cpp:674
|
||||
msgid " Standard"
|
||||
msgstr " Standard"
|
||||
|
||||
#: ../../../uibase.cpp:696
|
||||
msgid "&From:"
|
||||
msgstr "&Proveniente da:"
|
||||
|
||||
#: ../../../uibase.cpp:713
|
||||
msgid "&Message:"
|
||||
msgstr "&Messaggio:"
|
||||
|
||||
#: ../../../uibase.cpp:730
|
||||
msgid "&Send"
|
||||
msgstr "&Invia"
|
||||
|
||||
#: ../../../uibase.cpp:782
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connessione in corso..."
|
||||
|
||||
#: ../../../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 "Questi sono i tuoi indirizzi Bitcoin per ricevere pagamenti. Potrai darne uno diverso ad ognuno per cosi tenere traccia di chi ti sta pagando. L'indirizzo selezionato sarà quello mostrato nella finestra principale."
|
||||
|
||||
#: ../../../uibase.cpp:845
|
||||
#: ../../../uibase.cpp:957
|
||||
msgid "&Edit..."
|
||||
msgstr "&Cambia..."
|
||||
|
||||
#: ../../../uibase.cpp:848
|
||||
#: ../../../uibase.cpp:960
|
||||
msgid " &New Address... "
|
||||
msgstr " &Nuovo indirizzo... "
|
||||
|
||||
#: ../../../uibase.cpp:920
|
||||
msgid "Sending"
|
||||
msgstr "Inviando"
|
||||
|
||||
#: ../../../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 "Questi sono i tuoi indirizzi Bitcoin per ricevere pagamenti. Potrai darne uno diverso ad ognuno per cosi tenere traccia di chi ti sta pagando. L'indirizzo selezionato sarà quello mostrato nella finestra principale."
|
||||
|
||||
#: ../../../uibase.cpp:941
|
||||
msgid "Receiving"
|
||||
msgstr "Ricevendo"
|
||||
|
||||
#: ../../../uibase.cpp:951
|
||||
msgid "&Delete"
|
||||
msgstr "&Cancella"
|
||||
|
||||
#: ../../../uibase.h:150
|
||||
msgid "Transaction Details"
|
||||
msgstr "Dettagli operazione"
|
||||
|
||||
#: ../../../uibase.h:203
|
||||
msgid "Options"
|
||||
msgstr "Opzioni"
|
||||
|
||||
#: ../../../uibase.h:231
|
||||
msgid "About Bitcoin"
|
||||
msgstr "Info Bitcoin"
|
||||
|
||||
#: ../../../uibase.h:341
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Il tuo indirizzo Bitcoin"
|
||||
BIN
locale/nl/LC_MESSAGES/bitcoin.mo
Normal file
BIN
locale/nl/LC_MESSAGES/bitcoin.mo
Normal file
Binary file not shown.
808
locale/nl/LC_MESSAGES/bitcoin.po
Normal file
808
locale/nl/LC_MESSAGES/bitcoin.po
Normal file
@@ -0,0 +1,808 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-05-26 22:02-0000\n"
|
||||
"PO-Revision-Date: 2010-05-27 19:27+0100\n"
|
||||
"Last-Translator: Xunie\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-SearchPath-0: ../../..\n"
|
||||
|
||||
#: ../../../init.cpp:342
|
||||
msgid "Usage: bitcoin [options]"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../init.cpp:343
|
||||
msgid "Options:\n"
|
||||
msgstr "Opties:\n"
|
||||
|
||||
#: ../../../init.cpp:344
|
||||
msgid "Generate coins\n"
|
||||
msgstr "Genereer coins\n"
|
||||
|
||||
#: ../../../init.cpp:345
|
||||
msgid "Don't generate coins\n"
|
||||
msgstr "Genereer geen coins\n"
|
||||
|
||||
#: ../../../init.cpp:346
|
||||
msgid "Start minimized\n"
|
||||
msgstr "Start geminimalizeerd\n"
|
||||
|
||||
#: ../../../init.cpp:347
|
||||
msgid "Specify data directory\n"
|
||||
msgstr "Specificeer data map\n"
|
||||
|
||||
#: ../../../init.cpp:348
|
||||
msgid "Connect through socks4 proxy\n"
|
||||
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"
|
||||
|
||||
#: ../../../init.cpp:350
|
||||
msgid "Connect only to the specified node\n"
|
||||
msgstr "Verbind alleen naar deze node\n"
|
||||
|
||||
#: ../../../init.cpp:351
|
||||
msgid "This help message\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../init.cpp:455
|
||||
msgid "Error loading addr.dat \n"
|
||||
msgstr "Fout bij laden van bestand addr.dat \n"
|
||||
|
||||
#: ../../../init.cpp:461
|
||||
msgid "Error loading blkindex.dat \n"
|
||||
msgstr "Fout bij laden van bestand blkindex.dat \n"
|
||||
|
||||
#: ../../../init.cpp:468
|
||||
msgid "Error loading wallet.dat \n"
|
||||
msgstr "Fout bij laden van bestand wallet.dat \n"
|
||||
|
||||
#: ../../../init.cpp:536
|
||||
msgid "Invalid -proxy address"
|
||||
msgstr "Foutief -proxy adres"
|
||||
|
||||
#: ../../../init.cpp:629
|
||||
msgid "Program has crashed and will terminate. "
|
||||
msgstr "Programma is gecrashed en word afgesloten. "
|
||||
|
||||
#: ../../../main.cpp:1465
|
||||
msgid "Warning: Disk space is low "
|
||||
msgstr "Waarschuwng: Gebrek aan schijf ruimte "
|
||||
|
||||
#: ../../../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 "
|
||||
|
||||
#: ../../../main.cpp:2996
|
||||
msgid "Error: Transaction creation failed "
|
||||
msgstr "Fout: Transactie aanmaak gefaald "
|
||||
|
||||
#: ../../../main.cpp:3001
|
||||
#: ../../../ui.cpp:1761
|
||||
#: ../../../ui.cpp:1763
|
||||
#: ../../../ui.cpp:1904
|
||||
#: ../../../ui.cpp:2053
|
||||
msgid "Sending..."
|
||||
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."
|
||||
|
||||
#: ../../../main.cpp:3017
|
||||
msgid "Invalid amount"
|
||||
msgstr "Foutief aantal"
|
||||
|
||||
#: ../../../main.cpp:3019
|
||||
#: ../../../ui.cpp:1971
|
||||
#: ../../../ui.cpp:2038
|
||||
msgid "Insufficient funds"
|
||||
msgstr "Onvoldoende coins"
|
||||
|
||||
#: ../../../main.cpp:3024
|
||||
msgid "Invalid bitcoin address"
|
||||
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?"
|
||||
|
||||
#: ../../../ui.cpp:285
|
||||
msgid "Status"
|
||||
msgstr "Status"
|
||||
|
||||
#: ../../../ui.cpp:286
|
||||
msgid "Date"
|
||||
msgstr "Datum"
|
||||
|
||||
#: ../../../ui.cpp:287
|
||||
msgid "Description"
|
||||
msgstr "Beschrijving"
|
||||
|
||||
#: ../../../ui.cpp:288
|
||||
msgid "Debit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:289
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:489
|
||||
#, c-format
|
||||
msgid "Open for %d blocks"
|
||||
msgstr "Open voor %d blocks"
|
||||
|
||||
#: ../../../ui.cpp:491
|
||||
#, c-format
|
||||
msgid "Open until %s"
|
||||
msgstr "Open tot %s"
|
||||
|
||||
#: ../../../ui.cpp:497
|
||||
#, c-format
|
||||
msgid "%d/offline?"
|
||||
msgstr "%d/offline?"
|
||||
|
||||
#: ../../../ui.cpp:499
|
||||
#, c-format
|
||||
msgid "%d/unconfirmed"
|
||||
msgstr "%d/niet bevestigd"
|
||||
|
||||
#: ../../../ui.cpp:501
|
||||
#, c-format
|
||||
msgid "%d confirmations"
|
||||
msgstr "%d bevestigingen"
|
||||
|
||||
#: ../../../ui.cpp:584
|
||||
msgid "Generated"
|
||||
msgstr "Gegenereerd"
|
||||
|
||||
#: ../../../ui.cpp:592
|
||||
#, c-format
|
||||
msgid "Generated (%s matures in %d more blocks)"
|
||||
msgstr "Gegenereerd (%s word volwassen in %d blokken)"
|
||||
|
||||
#: ../../../ui.cpp:596
|
||||
msgid "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"
|
||||
msgstr "Gegenereerd - Waarschuwing: Dit blok is niet ontvangen door andere nodes en zal waarschijnlijk niet geaccepteerd worden!"
|
||||
|
||||
#: ../../../ui.cpp:600
|
||||
msgid "Generated (not accepted)"
|
||||
msgstr "Gegenereerd (niet geaccepteerd)"
|
||||
|
||||
#: ../../../ui.cpp:610
|
||||
msgid "From: "
|
||||
msgstr "Van: "
|
||||
|
||||
#: ../../../ui.cpp:634
|
||||
msgid "From: unknown, Received with: "
|
||||
msgstr "Van: onbekend, Ontvangen met: "
|
||||
|
||||
#: ../../../ui.cpp:676
|
||||
msgid "Payment to yourself"
|
||||
msgstr "Betaling naar u zelf"
|
||||
|
||||
#: ../../../ui.cpp:713
|
||||
msgid "To: "
|
||||
msgstr "Naar: "
|
||||
|
||||
#: ../../../ui.cpp:1009
|
||||
msgid " Generating"
|
||||
msgstr " Genereert"
|
||||
|
||||
#: ../../../ui.cpp:1011
|
||||
msgid "(not connected)"
|
||||
msgstr "(niet verbonden)"
|
||||
|
||||
#: ../../../ui.cpp:1014
|
||||
#, c-format
|
||||
msgid " %d connections %d blocks %d transactions"
|
||||
msgstr " %d verbindingen %d blokken %d transacties"
|
||||
|
||||
#: ../../../ui.cpp:1123
|
||||
#: ../../../ui.cpp:2351
|
||||
msgid "New Receiving Address"
|
||||
msgstr "Nieuw Ontvangings Adres"
|
||||
|
||||
#: ../../../ui.cpp:1124
|
||||
#: ../../../ui.cpp:2352
|
||||
msgid ""
|
||||
"It's good policy to use a new address for each payment you receive.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
msgstr ""
|
||||
"Het is goed beleid om een nieuw adres voor elke betaling te hebben.\n"
|
||||
"\n"
|
||||
"Label"
|
||||
|
||||
#: ../../../ui.cpp:1193
|
||||
msgid "<b>Status:</b> "
|
||||
msgstr "<b>Status:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1198
|
||||
msgid ", has not been successfully broadcast yet"
|
||||
msgstr ", is nog niet succesvol verstuurd naar het netwerk"
|
||||
|
||||
#: ../../../ui.cpp:1200
|
||||
#, c-format
|
||||
msgid ", broadcast through %d node"
|
||||
msgstr ", verstuurd via %d node"
|
||||
|
||||
#: ../../../ui.cpp:1202
|
||||
#, c-format
|
||||
msgid ", broadcast through %d nodes"
|
||||
msgstr ", verstuurd via %d nodes"
|
||||
|
||||
#: ../../../ui.cpp:1206
|
||||
msgid "<b>Date:</b> "
|
||||
msgstr "<b>Datum:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1214
|
||||
msgid "<b>Source:</b> Generated<br>"
|
||||
msgstr "<b>Bron:</b> Gegenereerd<br>"
|
||||
|
||||
#: ../../../ui.cpp:1220
|
||||
#: ../../../ui.cpp:1238
|
||||
msgid "<b>From:</b> "
|
||||
msgstr "<b>Van:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1238
|
||||
msgid "unknown"
|
||||
msgstr "onbekend"
|
||||
|
||||
#: ../../../ui.cpp:1239
|
||||
#: ../../../ui.cpp:1263
|
||||
#: ../../../ui.cpp:1322
|
||||
msgid "<b>To:</b> "
|
||||
msgstr "<b>Naar:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1242
|
||||
msgid " (yours, label: "
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:1244
|
||||
#, fuzzy
|
||||
msgid " (yours)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:1281
|
||||
#: ../../../ui.cpp:1293
|
||||
#: ../../../ui.cpp:1356
|
||||
msgid "<b>Credit:</b> "
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:1283
|
||||
#, c-format
|
||||
msgid "(%s matures in %d more blocks)"
|
||||
msgstr "(%s word volwassen in %d blokken)"
|
||||
|
||||
#: ../../../ui.cpp:1285
|
||||
msgid "(not accepted)"
|
||||
msgstr "(niet geaccepteerd"
|
||||
|
||||
#: ../../../ui.cpp:1330
|
||||
#: ../../../ui.cpp:1353
|
||||
msgid "<b>Debit:</b> "
|
||||
msgstr ""
|
||||
|
||||
#: ../../../ui.cpp:1344
|
||||
msgid "<b>Transaction fee:</b> "
|
||||
msgstr "<b>Transactie fooi:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1360
|
||||
msgid "<b>Net amount:</b> "
|
||||
msgstr "<b>Netto bedrag:</b> "
|
||||
|
||||
#: ../../../ui.cpp:1367
|
||||
msgid "Message:"
|
||||
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."
|
||||
|
||||
#: ../../../ui.cpp:1437
|
||||
msgid "Main"
|
||||
msgstr "Hoofd"
|
||||
|
||||
#: ../../../ui.cpp:1442
|
||||
msgid "&Minimize on close"
|
||||
msgstr "&Minimalizeer bij sluiten"
|
||||
|
||||
#: ../../../ui.cpp:1595
|
||||
#, c-format
|
||||
msgid "version 0.%d.%d beta"
|
||||
msgstr "versie 0.%d.%d beta"
|
||||
|
||||
#: ../../../ui.cpp:1681
|
||||
msgid "Will appear as \"From: Unknown\""
|
||||
msgstr "Word vertoont als \"Van: 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"
|
||||
|
||||
#: ../../../ui.cpp:1735
|
||||
msgid "Error in amount "
|
||||
msgstr "Fout in hoeveelheid "
|
||||
|
||||
#: ../../../ui.cpp:1735
|
||||
#: ../../../ui.cpp:1740
|
||||
#: ../../../ui.cpp:1745
|
||||
#: ../../../ui.cpp:1771
|
||||
#: ../../../uibase.cpp:61
|
||||
msgid "Send Coins"
|
||||
msgstr "Verstuur Coins"
|
||||
|
||||
#: ../../../ui.cpp:1740
|
||||
msgid "Amount exceeds your balance "
|
||||
msgstr "Hoeveelheid hoger dan uw huidige balans "
|
||||
|
||||
#: ../../../ui.cpp:1745
|
||||
msgid "Total exceeds your balance when the "
|
||||
msgstr "Totaal groter dan uw huidige balans wanner de "
|
||||
|
||||
#: ../../../ui.cpp:1745
|
||||
msgid " transaction fee is included "
|
||||
msgstr " transactie fooi is bijgerekend "
|
||||
|
||||
#: ../../../ui.cpp:1761
|
||||
msgid "Payment sent "
|
||||
msgstr "Betaling verstuurd "
|
||||
|
||||
#: ../../../ui.cpp:1771
|
||||
msgid "Invalid address "
|
||||
msgstr "Foutief adres "
|
||||
|
||||
#: ../../../ui.cpp:1825
|
||||
#, c-format
|
||||
msgid "Sending %s to %s"
|
||||
msgstr "Verstuurd %s naar %s"
|
||||
|
||||
#: ../../../ui.cpp:1898
|
||||
#: ../../../ui.cpp:1931
|
||||
msgid "CANCELLED"
|
||||
msgstr "GEANNULEERD"
|
||||
|
||||
#: ../../../ui.cpp:1902
|
||||
msgid "Cancelled"
|
||||
msgstr "Geannuleerd"
|
||||
|
||||
#: ../../../ui.cpp:1904
|
||||
msgid "Transfer cancelled "
|
||||
msgstr "Transactie geannuleerd "
|
||||
|
||||
#: ../../../ui.cpp:1957
|
||||
msgid "Error: "
|
||||
msgstr "Fout: "
|
||||
|
||||
#: ../../../ui.cpp:1976
|
||||
msgid "Connecting..."
|
||||
msgstr "Verbinden..."
|
||||
|
||||
#: ../../../ui.cpp:1981
|
||||
msgid "Unable to connect"
|
||||
msgstr "Kan niet verbinden"
|
||||
|
||||
#: ../../../ui.cpp:1986
|
||||
msgid "Requesting public key..."
|
||||
msgstr "Aanvragen van publieke sleutel..."
|
||||
|
||||
#: ../../../ui.cpp:1998
|
||||
msgid "Received public key..."
|
||||
msgstr "Publieke sleutel ontvangen..."
|
||||
|
||||
#: ../../../ui.cpp:2010
|
||||
msgid "Transfer was not accepted"
|
||||
msgstr "Transactie niet geaccepteerd"
|
||||
|
||||
#: ../../../ui.cpp:2019
|
||||
msgid "Invalid response received"
|
||||
msgstr "Foutief antwoord ontvangen"
|
||||
|
||||
#: ../../../ui.cpp:2034
|
||||
msgid "Creating transaction..."
|
||||
msgstr "Maakt transactie aan..."
|
||||
|
||||
#: ../../../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"
|
||||
|
||||
#: ../../../ui.cpp:2048
|
||||
msgid "Transaction creation failed"
|
||||
msgstr "Transactie aanmaak gefaald."
|
||||
|
||||
#: ../../../ui.cpp:2055
|
||||
msgid "Transaction aborted"
|
||||
msgstr "Transactie geannuleerd"
|
||||
|
||||
#: ../../../ui.cpp:2063
|
||||
msgid "Lost connection, transaction cancelled"
|
||||
msgstr "Verbinding verloren, transactie geannuleerd"
|
||||
|
||||
#: ../../../ui.cpp:2079
|
||||
msgid "Sending payment..."
|
||||
msgstr "Versturen van betaling..."
|
||||
|
||||
#: ../../../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."
|
||||
|
||||
#: ../../../ui.cpp:2092
|
||||
msgid "Waiting for confirmation..."
|
||||
msgstr "Wachten op bevestiging..."
|
||||
|
||||
#: ../../../ui.cpp:2110
|
||||
msgid ""
|
||||
"The payment was sent, but the recipient was unable to verify it.\n"
|
||||
"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."
|
||||
|
||||
#: ../../../ui.cpp:2119
|
||||
msgid "Payment was sent, but an invalid response was received"
|
||||
msgstr "Betaling was verstuurd, maar een foutief antword was ontvangen."
|
||||
|
||||
#: ../../../ui.cpp:2125
|
||||
msgid "Payment completed"
|
||||
msgstr "Betaling voltooid"
|
||||
|
||||
#: ../../../ui.cpp:2156
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2339
|
||||
msgid "Name"
|
||||
msgstr "Naam"
|
||||
|
||||
#: ../../../ui.cpp:2157
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2339
|
||||
msgid "Address"
|
||||
msgstr "Adres"
|
||||
|
||||
#: ../../../ui.cpp:2159
|
||||
#: ../../../ui.cpp:2314
|
||||
msgid "Label"
|
||||
msgstr "Label"
|
||||
|
||||
#: ../../../ui.cpp:2160
|
||||
#: ../../../uibase.cpp:908
|
||||
msgid "Bitcoin Address"
|
||||
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. "
|
||||
|
||||
#: ../../../ui.cpp:2302
|
||||
#: ../../../ui.cpp:2308
|
||||
msgid "Edit Address"
|
||||
msgstr "Bewerk Adres"
|
||||
|
||||
#: ../../../ui.cpp:2314
|
||||
msgid "Edit Address Label"
|
||||
msgstr "Bewerk Adres Label"
|
||||
|
||||
#: ../../../ui.cpp:2339
|
||||
#: ../../../ui.cpp:2345
|
||||
msgid "Add Address"
|
||||
msgstr "Adres Toevoegen"
|
||||
|
||||
#: ../../../ui.cpp:2421
|
||||
msgid "Bitcoin"
|
||||
msgstr "Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2423
|
||||
msgid "Bitcoin - Generating"
|
||||
msgstr "Bitcoin - Genereert"
|
||||
|
||||
#: ../../../ui.cpp:2425
|
||||
msgid "Bitcoin - (not connected)"
|
||||
msgstr "Bitcoin - (niet verbonden)"
|
||||
|
||||
#: ../../../ui.cpp:2500
|
||||
msgid "&Open Bitcoin"
|
||||
msgstr "&Open Bitcoin"
|
||||
|
||||
#: ../../../ui.cpp:2501
|
||||
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"
|
||||
msgstr "A&fsluiten"
|
||||
|
||||
#: ../../../uibase.cpp:30
|
||||
msgid "&File"
|
||||
msgstr "&Bestand"
|
||||
|
||||
#: ../../../uibase.cpp:38
|
||||
msgid "&Your Receiving Addresses..."
|
||||
msgstr "&Uw Ontvang Adressen..."
|
||||
|
||||
#: ../../../uibase.cpp:42
|
||||
msgid "&Options..."
|
||||
msgstr "&Opties..."
|
||||
|
||||
#: ../../../uibase.cpp:45
|
||||
msgid "&Settings"
|
||||
msgstr "&Eigenschappen"
|
||||
|
||||
#: ../../../uibase.cpp:49
|
||||
msgid "&About..."
|
||||
msgstr "&Over..."
|
||||
|
||||
#: ../../../uibase.cpp:52
|
||||
msgid "&Help"
|
||||
msgstr "&Help"
|
||||
|
||||
#: ../../../uibase.cpp:62
|
||||
msgid "Address Book"
|
||||
msgstr "Adressen Boek"
|
||||
|
||||
#: ../../../uibase.cpp:77
|
||||
msgid "Your Bitcoin Address:"
|
||||
msgstr "Uw Bitcoin Address:"
|
||||
|
||||
#: ../../../uibase.cpp:84
|
||||
msgid " &New... "
|
||||
msgstr " &Nieuw... "
|
||||
|
||||
#: ../../../uibase.cpp:87
|
||||
#: ../../../uibase.cpp:851
|
||||
#: ../../../uibase.cpp:954
|
||||
msgid " &Copy to Clipboard "
|
||||
msgstr " &Kopieer naar Plakboord "
|
||||
|
||||
#: ../../../uibase.cpp:102
|
||||
msgid "Balance:"
|
||||
msgstr "Balans:"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " All"
|
||||
msgstr " Alles"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " Sent"
|
||||
msgstr " Verstuurd"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " Received"
|
||||
msgstr " Ontvangen"
|
||||
|
||||
#: ../../../uibase.cpp:121
|
||||
msgid " In Progress"
|
||||
msgstr " Word Verwerkt"
|
||||
|
||||
#: ../../../uibase.cpp:142
|
||||
msgid "All Transactions"
|
||||
msgstr "Alle transacties"
|
||||
|
||||
#: ../../../uibase.cpp:153
|
||||
msgid "Sent/Received"
|
||||
msgstr "Verstuurd/Ontvangen"
|
||||
|
||||
#: ../../../uibase.cpp:164
|
||||
msgid "Sent"
|
||||
msgstr "Verstuurd"
|
||||
|
||||
#: ../../../uibase.cpp:175
|
||||
msgid "Received"
|
||||
msgstr "Ontvangen"
|
||||
|
||||
#: ../../../uibase.cpp:318
|
||||
#: ../../../uibase.cpp:479
|
||||
#: ../../../uibase.cpp:580
|
||||
#: ../../../uibase.cpp:793
|
||||
#: ../../../uibase.cpp:854
|
||||
#: ../../../uibase.cpp:963
|
||||
#: ../../../uibase.cpp:1052
|
||||
msgid "OK"
|
||||
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."
|
||||
|
||||
#: ../../../uibase.cpp:370
|
||||
msgid "Transaction fee:"
|
||||
msgstr "Transactie fooi:"
|
||||
|
||||
#: ../../../uibase.cpp:386
|
||||
msgid "&Limit coin generation to"
|
||||
msgstr "&Limiteer coin generatie tot"
|
||||
|
||||
#: ../../../uibase.cpp:393
|
||||
msgid "processors"
|
||||
msgstr "processors"
|
||||
|
||||
#: ../../../uibase.cpp:399
|
||||
msgid "&Start Bitcoin on system startup"
|
||||
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"
|
||||
|
||||
#: ../../../uibase.cpp:407
|
||||
msgid "M&inimize to the tray on close"
|
||||
msgstr "M&inimalizeer tot taakbalk bij sluiten"
|
||||
|
||||
#: ../../../uibase.cpp:414
|
||||
msgid "&Connect through socks4 proxy: "
|
||||
msgstr "&Verbind via socks4 proxy: "
|
||||
|
||||
#: ../../../uibase.cpp:426
|
||||
msgid "Proxy &IP:"
|
||||
msgstr "Proxy &IP:"
|
||||
|
||||
#: ../../../uibase.cpp:434
|
||||
msgid " &Port:"
|
||||
msgstr " &Poort:"
|
||||
|
||||
#: ../../../uibase.cpp:456
|
||||
msgid "// [don't translate] Test panel 2 for future expansion"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:460
|
||||
msgid "// [don't translate] Let's not start multiple pages until the first page is filled up"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../uibase.cpp:482
|
||||
#: ../../../uibase.cpp:735
|
||||
#: ../../../uibase.cpp:798
|
||||
#: ../../../uibase.cpp:857
|
||||
#: ../../../uibase.cpp:966
|
||||
#: ../../../uibase.cpp:1055
|
||||
msgid "Cancel"
|
||||
msgstr "Annuleer"
|
||||
|
||||
#: ../../../uibase.cpp:485
|
||||
msgid "&Apply"
|
||||
msgstr "&Toepassen"
|
||||
|
||||
#: ../../../uibase.cpp:546
|
||||
msgid "Bitcoin "
|
||||
msgstr "Bitcoin "
|
||||
|
||||
#: ../../../uibase.cpp:552
|
||||
msgid "version"
|
||||
msgstr "versie"
|
||||
|
||||
#: ../../../uibase.cpp:563
|
||||
msgid ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"\n"
|
||||
"This is experimental software. Do not rely on it for actual financial transactions.\n"
|
||||
"\n"
|
||||
"Distributed under the MIT/X11 software license, see the accompanying file \n"
|
||||
"license.txt or http://www.opensource.org/licenses/mit-license.php.\n"
|
||||
"\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)."
|
||||
msgstr ""
|
||||
"Copyright (c) 2009-2010 Satoshi Nakamoto.\n"
|
||||
"\n"
|
||||
"Dit is experimentele software. Vertrouw niet op het voor echte financiele transacties.\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"
|
||||
"\n"
|
||||
"Dit product komt met software ontwikkeld door het OpenSSL Project for gebruik in de\n"
|
||||
"OpenSSL Toolkit (http://www.openssl.org/) and de cryptografische software geschreven door \n"
|
||||
"Eric Young (eay@cryptsoft.com)."
|
||||
|
||||
#: ../../../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."
|
||||
|
||||
#: ../../../uibase.cpp:633
|
||||
msgid "Pay &To:"
|
||||
msgstr "Betaal &Naar:"
|
||||
|
||||
#: ../../../uibase.cpp:648
|
||||
msgid "&Paste"
|
||||
msgstr "&Plakken"
|
||||
|
||||
#: ../../../uibase.cpp:651
|
||||
msgid " Address &Book..."
|
||||
msgstr " Adressen &Boek..."
|
||||
|
||||
#: ../../../uibase.cpp:658
|
||||
msgid "&Amount:"
|
||||
msgstr "&Hoeveelheid:"
|
||||
|
||||
#: ../../../uibase.cpp:668
|
||||
msgid "T&ransfer:"
|
||||
msgstr "O&verdracht:"
|
||||
|
||||
#: ../../../uibase.cpp:674
|
||||
msgid " Standard"
|
||||
msgstr " Standaard"
|
||||
|
||||
#: ../../../uibase.cpp:696
|
||||
msgid "&From:"
|
||||
msgstr "&Van:"
|
||||
|
||||
#: ../../../uibase.cpp:713
|
||||
msgid "&Message:"
|
||||
msgstr "&Mededeling:"
|
||||
|
||||
#: ../../../uibase.cpp:730
|
||||
msgid "&Send"
|
||||
msgstr "&Verstuur"
|
||||
|
||||
#: ../../../uibase.cpp:782
|
||||
msgid ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Connecting..."
|
||||
msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"Verbinden..."
|
||||
|
||||
#: ../../../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."
|
||||
|
||||
#: ../../../uibase.cpp:845
|
||||
#: ../../../uibase.cpp:957
|
||||
msgid "&Edit..."
|
||||
msgstr "&Bewerk..."
|
||||
|
||||
#: ../../../uibase.cpp:848
|
||||
#: ../../../uibase.cpp:960
|
||||
msgid " &New Address... "
|
||||
msgstr " &New Adres... "
|
||||
|
||||
#: ../../../uibase.cpp:920
|
||||
msgid "Sending"
|
||||
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."
|
||||
|
||||
#: ../../../uibase.cpp:941
|
||||
msgid "Receiving"
|
||||
msgstr "Ontvangen"
|
||||
|
||||
#: ../../../uibase.cpp:951
|
||||
msgid "&Delete"
|
||||
msgstr "&Verwijder"
|
||||
|
||||
#: ../../../uibase.h:150
|
||||
msgid "Transaction Details"
|
||||
msgstr "Transactie Details"
|
||||
|
||||
#: ../../../uibase.h:203
|
||||
msgid "Options"
|
||||
msgstr "Opties"
|
||||
|
||||
#: ../../../uibase.h:231
|
||||
msgid "About Bitcoin"
|
||||
msgstr "Over Bitcoin"
|
||||
|
||||
#: ../../../uibase.h:341
|
||||
msgid "Your Bitcoin Addresses"
|
||||
msgstr "Uw Bitcoin Adressen"
|
||||
186
main.cpp
186
main.cpp
@@ -49,6 +49,8 @@ CCriticalSection cs_mapRequestCount;
|
||||
map<string, string> mapAddressBook;
|
||||
CCriticalSection cs_mapAddressBook;
|
||||
|
||||
vector<unsigned char> vchDefaultKey;
|
||||
|
||||
// Settings
|
||||
int fGenerateBitcoins = false;
|
||||
int64 nTransactionFee = 0;
|
||||
@@ -142,6 +144,19 @@ bool AddToWallet(const CWalletTx& wtxIn)
|
||||
if (!wtx.WriteToDisk())
|
||||
return false;
|
||||
|
||||
// If default receiving address gets used, replace it with a new one
|
||||
CScript scriptDefaultKey;
|
||||
scriptDefaultKey.SetBitcoinAddress(vchDefaultKey);
|
||||
foreach(const CTxOut& txout, wtx.vout)
|
||||
{
|
||||
if (txout.scriptPubKey == scriptDefaultKey)
|
||||
{
|
||||
CWalletDB walletdb;
|
||||
walletdb.WriteDefaultKey(GenerateNewKey());
|
||||
walletdb.WriteName(PubKeyToAddress(vchDefaultKey), "");
|
||||
}
|
||||
}
|
||||
|
||||
// Notify UI
|
||||
vWalletUpdated.push_back(hash);
|
||||
}
|
||||
@@ -1336,19 +1351,12 @@ bool CBlock::AcceptBlock()
|
||||
if (!AddToBlockIndex(nFile, nBlockPos))
|
||||
return error("AcceptBlock() : AddToBlockIndex failed");
|
||||
|
||||
// Don't relay old inventory during initial block download.
|
||||
// Please keep this number updated to a few thousand below current block count.
|
||||
if (hashBestChain == hash && nBestHeight > 55000)
|
||||
RelayInventory(CInv(MSG_BLOCK, hash));
|
||||
|
||||
// // Add atoms to user reviews for coins created
|
||||
// vector<unsigned char> vchPubKey;
|
||||
// if (ExtractPubKey(vtx[0].vout[0].scriptPubKey, false, vchPubKey))
|
||||
// {
|
||||
// unsigned short nAtom = GetRand(USHRT_MAX - 100) + 100;
|
||||
// vector<unsigned short> vAtoms(1, nAtom);
|
||||
// AddAtomsAndPropagate(Hash(vchPubKey.begin(), vchPubKey.end()), vAtoms, true);
|
||||
// }
|
||||
// Relay inventory, but don't relay old inventory during initial block download
|
||||
if (hashBestChain == hash)
|
||||
CRITICAL_BLOCK(cs_vNodes)
|
||||
foreach(CNode* pnode, vNodes)
|
||||
if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 55000))
|
||||
pnode->PushInventory(CInv(MSG_BLOCK, hash));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1721,6 +1729,7 @@ bool ProcessMessages(CNode* pfrom)
|
||||
// (4) message start
|
||||
// (12) command
|
||||
// (4) size
|
||||
// (4) checksum
|
||||
// (x) data
|
||||
//
|
||||
|
||||
@@ -1728,12 +1737,13 @@ bool ProcessMessages(CNode* pfrom)
|
||||
{
|
||||
// Scan for message start
|
||||
CDataStream::iterator pstart = search(vRecv.begin(), vRecv.end(), BEGIN(pchMessageStart), END(pchMessageStart));
|
||||
if (vRecv.end() - pstart < sizeof(CMessageHeader))
|
||||
int nHeaderSize = vRecv.GetSerializeSize(CMessageHeader());
|
||||
if (vRecv.end() - pstart < nHeaderSize)
|
||||
{
|
||||
if (vRecv.size() > sizeof(CMessageHeader))
|
||||
if (vRecv.size() > nHeaderSize)
|
||||
{
|
||||
printf("\n\nPROCESSMESSAGE MESSAGESTART NOT FOUND\n\n");
|
||||
vRecv.erase(vRecv.begin(), vRecv.end() - sizeof(CMessageHeader));
|
||||
vRecv.erase(vRecv.begin(), vRecv.end() - nHeaderSize);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1742,6 +1752,7 @@ bool ProcessMessages(CNode* pfrom)
|
||||
vRecv.erase(vRecv.begin(), pstart);
|
||||
|
||||
// Read header
|
||||
vector<char> vHeaderSave(vRecv.begin(), vRecv.begin() + nHeaderSize);
|
||||
CMessageHeader hdr;
|
||||
vRecv >> hdr;
|
||||
if (!hdr.IsValid())
|
||||
@@ -1757,10 +1768,7 @@ bool ProcessMessages(CNode* pfrom)
|
||||
{
|
||||
// Rewind and wait for rest of message
|
||||
///// need a mechanism to give up waiting for overlong message size error
|
||||
//if (fDebug)
|
||||
// printf("message-break\n");
|
||||
vRecv.insert(vRecv.begin(), BEGIN(hdr), END(hdr));
|
||||
Sleep(100);
|
||||
vRecv.insert(vRecv.begin(), vHeaderSave.begin(), vHeaderSave.end());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1768,6 +1776,20 @@ bool ProcessMessages(CNode* pfrom)
|
||||
CDataStream vMsg(vRecv.begin(), vRecv.begin() + nMessageSize, vRecv.nType, vRecv.nVersion);
|
||||
vRecv.ignore(nMessageSize);
|
||||
|
||||
// Checksum
|
||||
if (vRecv.GetVersion() >= 209)
|
||||
{
|
||||
uint256 hash = Hash(vMsg.begin(), vMsg.end());
|
||||
unsigned int nChecksum = 0;
|
||||
memcpy(&nChecksum, &hash, sizeof(nChecksum));
|
||||
if (nChecksum != hdr.nChecksum)
|
||||
{
|
||||
printf("ProcessMessage(%s, %d bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
|
||||
strCommand.c_str(), nMessageSize, nChecksum, hdr.nChecksum);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Process message
|
||||
bool fRet = false;
|
||||
try
|
||||
@@ -1844,6 +1866,9 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
vRecv >> addrFrom >> nNonce;
|
||||
if (pfrom->nVersion >= 106 && !vRecv.empty())
|
||||
vRecv >> strSubVer;
|
||||
if (pfrom->nVersion >= 209 && !vRecv.empty())
|
||||
vRecv >> pfrom->nStartingHeight;
|
||||
|
||||
if (pfrom->nVersion == 0)
|
||||
return false;
|
||||
|
||||
@@ -1854,9 +1879,6 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
return true;
|
||||
}
|
||||
|
||||
pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION));
|
||||
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
|
||||
|
||||
pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
|
||||
if (pfrom->fClient)
|
||||
{
|
||||
@@ -1866,6 +1888,13 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
|
||||
AddTimeData(pfrom->addr.ip, nTime);
|
||||
|
||||
// Change version
|
||||
if (pfrom->nVersion >= 209)
|
||||
pfrom->PushMessage("verack");
|
||||
pfrom->vSend.SetVersion(min(pfrom->nVersion, VERSION));
|
||||
if (pfrom->nVersion < 209)
|
||||
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
|
||||
|
||||
// Ask the first connected node for block updates
|
||||
static bool fAskedForBlocks;
|
||||
if (!fAskedForBlocks && !pfrom->fClient)
|
||||
@@ -1876,7 +1905,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
|
||||
pfrom->fSuccessfullyConnected = true;
|
||||
|
||||
printf("version message: version %d\n", pfrom->nVersion);
|
||||
printf("version message: version %d, blocks=%d\n", pfrom->nVersion, pfrom->nStartingHeight);
|
||||
}
|
||||
|
||||
|
||||
@@ -1887,11 +1916,19 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
}
|
||||
|
||||
|
||||
else if (strCommand == "verack")
|
||||
{
|
||||
pfrom->vRecv.SetVersion(min(pfrom->nVersion, VERSION));
|
||||
}
|
||||
|
||||
|
||||
else if (strCommand == "addr")
|
||||
{
|
||||
vector<CAddress> vAddr;
|
||||
vRecv >> vAddr;
|
||||
if (vAddr.size() > 50000) // lower this to 1000 later
|
||||
if (pfrom->nVersion < 200) // don't want addresses from 0.1.5
|
||||
return true;
|
||||
if (vAddr.size() > 1000)
|
||||
return error("message addr size() = %d", vAddr.size());
|
||||
|
||||
// Store the new addresses
|
||||
@@ -1900,19 +1937,26 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
if (fShutdown)
|
||||
return true;
|
||||
addr.nTime = GetAdjustedTime() - 2 * 60 * 60;
|
||||
if (pfrom->fGetAddr)
|
||||
if (pfrom->fGetAddr || vAddr.size() > 10)
|
||||
addr.nTime -= 5 * 24 * 60 * 60;
|
||||
AddAddress(addr, false);
|
||||
pfrom->AddAddressKnown(addr);
|
||||
if (!pfrom->fGetAddr && addr.IsRoutable())
|
||||
{
|
||||
// Put on lists to send to other nodes
|
||||
// Relay to a limited number of other nodes
|
||||
CRITICAL_BLOCK(cs_vNodes)
|
||||
{
|
||||
multimap<int, CNode*> mapMix;
|
||||
foreach(CNode* pnode, vNodes)
|
||||
pnode->PushAddress(addr);
|
||||
mapMix.insert(make_pair(GetRand(INT_MAX), pnode));
|
||||
int nRelayNodes = 5;
|
||||
for (multimap<int, CNode*>::iterator mi = mapMix.begin(); mi != mapMix.end() && nRelayNodes-- > 0; ++mi)
|
||||
((*mi).second)->PushAddress(addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
pfrom->fGetAddr = false;
|
||||
if (vAddr.size() < 1000)
|
||||
pfrom->fGetAddr = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2101,9 +2145,8 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
vRecv >> *pblock;
|
||||
|
||||
//// debug print
|
||||
// printf("received block:\n");
|
||||
// pblock->print();
|
||||
printf("received block %s\n", pblock->GetHash().ToString().substr(0,16).c_str());
|
||||
// pblock->print();
|
||||
|
||||
CInv inv(MSG_BLOCK, pblock->GetHash());
|
||||
pfrom->AddInventoryKnown(inv);
|
||||
@@ -2156,6 +2199,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
uint256 hashReply;
|
||||
CWalletTx wtxNew;
|
||||
vRecv >> hashReply >> wtxNew;
|
||||
wtxNew.fFromMe = false;
|
||||
|
||||
// Broadcast
|
||||
if (!wtxNew.AcceptWalletTransaction())
|
||||
@@ -2221,7 +2265,7 @@ bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
|
||||
|
||||
|
||||
bool SendMessages(CNode* pto)
|
||||
bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
{
|
||||
CRITICAL_BLOCK(cs_main)
|
||||
{
|
||||
@@ -2252,15 +2296,6 @@ bool SendMessages(CNode* pto)
|
||||
}
|
||||
}
|
||||
|
||||
// Delay tx inv messages to protect privacy,
|
||||
// trickle them out to a few nodes at a time.
|
||||
bool fSendTxInv = false;
|
||||
if (GetTimeMillis() > pto->nNextSendTxInv)
|
||||
{
|
||||
pto->nNextSendTxInv = GetTimeMillis() + 3000 + GetRand(2000);
|
||||
fSendTxInv = true;
|
||||
}
|
||||
|
||||
// Resend wallet transactions that haven't gotten in a block yet
|
||||
ResendWalletTransactions();
|
||||
|
||||
@@ -2268,24 +2303,28 @@ bool SendMessages(CNode* pto)
|
||||
//
|
||||
// Message: addr
|
||||
//
|
||||
vector<CAddress> vAddr;
|
||||
vAddr.reserve(pto->vAddrToSend.size());
|
||||
foreach(const CAddress& addr, pto->vAddrToSend)
|
||||
if (fSendTrickle)
|
||||
{
|
||||
// returns true if wasn't already contained in the set
|
||||
if (pto->setAddrKnown.insert(addr).second)
|
||||
vector<CAddress> vAddr;
|
||||
vAddr.reserve(pto->vAddrToSend.size());
|
||||
foreach(const CAddress& addr, pto->vAddrToSend)
|
||||
{
|
||||
vAddr.push_back(addr);
|
||||
if (vAddr.size() >= 1000)
|
||||
// returns true if wasn't already contained in the set
|
||||
if (pto->setAddrKnown.insert(addr).second)
|
||||
{
|
||||
pto->PushMessage("addr", vAddr);
|
||||
vAddr.clear();
|
||||
vAddr.push_back(addr);
|
||||
// receiver rejects addr messages larger than 1000
|
||||
if (vAddr.size() >= 1000)
|
||||
{
|
||||
pto->PushMessage("addr", vAddr);
|
||||
vAddr.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
pto->vAddrToSend.clear();
|
||||
if (!vAddr.empty())
|
||||
pto->PushMessage("addr", vAddr);
|
||||
}
|
||||
pto->vAddrToSend.clear();
|
||||
if (!vAddr.empty())
|
||||
pto->PushMessage("addr", vAddr);
|
||||
|
||||
|
||||
//
|
||||
@@ -2299,11 +2338,40 @@ bool SendMessages(CNode* pto)
|
||||
vInvWait.reserve(pto->vInventoryToSend.size());
|
||||
foreach(const CInv& inv, pto->vInventoryToSend)
|
||||
{
|
||||
// delay txes
|
||||
if (!fSendTxInv && inv.type == MSG_TX)
|
||||
{
|
||||
vInvWait.push_back(inv);
|
||||
if (pto->setInventoryKnown.count(inv))
|
||||
continue;
|
||||
|
||||
// trickle out tx inv to protect privacy
|
||||
if (inv.type == MSG_TX && !fSendTrickle)
|
||||
{
|
||||
// 1/4 of tx invs blast to all immediately
|
||||
static uint256 hashSalt;
|
||||
if (hashSalt == 0)
|
||||
RAND_bytes((unsigned char*)&hashSalt, sizeof(hashSalt));
|
||||
uint256 hashRand = (inv.hash ^ hashSalt);
|
||||
hashRand = Hash(BEGIN(hashRand), END(hashRand));
|
||||
bool fTrickleWait = ((hashRand & 3) != 0);
|
||||
|
||||
// always trickle our own transactions
|
||||
if (!fTrickleWait)
|
||||
{
|
||||
TRY_CRITICAL_BLOCK(cs_mapWallet)
|
||||
{
|
||||
map<uint256, CWalletTx>::iterator mi = mapWallet.find(inv.hash);
|
||||
if (mi != mapWallet.end())
|
||||
{
|
||||
CWalletTx& wtx = (*mi).second;
|
||||
if (wtx.fFromMe)
|
||||
fTrickleWait = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fTrickleWait)
|
||||
{
|
||||
vInvWait.push_back(inv);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if wasn't already contained in the set
|
||||
@@ -2388,8 +2456,11 @@ void GenerateBitcoins(bool fGenerate)
|
||||
int nAddThreads = nProcessors - vnThreadsRunning[3];
|
||||
printf("Starting %d BitcoinMiner threads\n", nAddThreads);
|
||||
for (int i = 0; i < nAddThreads; i++)
|
||||
{
|
||||
if (!CreateThread(ThreadBitcoinMiner, NULL))
|
||||
printf("Error: CreateThread(ThreadBitcoinMiner) failed\n");
|
||||
Sleep(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2828,6 +2899,7 @@ bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CK
|
||||
{
|
||||
wtxNew.vin.clear();
|
||||
wtxNew.vout.clear();
|
||||
wtxNew.fFromMe = true;
|
||||
if (nValue < 0)
|
||||
return false;
|
||||
int64 nValueOut = nValue;
|
||||
|
||||
3
main.h
3
main.h
@@ -38,6 +38,7 @@ extern map<uint256, int> mapRequestCount;
|
||||
extern CCriticalSection cs_mapRequestCount;
|
||||
extern map<string, string> mapAddressBook;
|
||||
extern CCriticalSection cs_mapAddressBook;
|
||||
extern vector<unsigned char> vchDefaultKey;
|
||||
|
||||
// Settings
|
||||
extern int fGenerateBitcoins;
|
||||
@@ -66,7 +67,7 @@ bool LoadBlockIndex(bool fAllowNew=true);
|
||||
void PrintBlockTree();
|
||||
bool ProcessMessages(CNode* pfrom);
|
||||
bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv);
|
||||
bool SendMessages(CNode* pto);
|
||||
bool SendMessages(CNode* pto, bool fSendTrickle);
|
||||
int64 GetBalance();
|
||||
bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CKey& keyRet, int64& nFeeRequiredRet);
|
||||
bool CommitTransaction(CWalletTx& wtxNew, const CKey& key);
|
||||
|
||||
@@ -29,7 +29,7 @@ LIBS= \
|
||||
|
||||
WXDEFS=-DWIN32 -D__WXMSW__ -D_WINDOWS -DNOPCH
|
||||
DEBUGFLAGS=-g -D__WXDEBUG__
|
||||
CFLAGS=-mthreads -O0 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
|
||||
CFLAGS=-mthreads -O2 -w -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
|
||||
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 init.h sha.h
|
||||
|
||||
|
||||
65
makefile.osx
Normal file
65
makefile.osx
Normal file
@@ -0,0 +1,65 @@
|
||||
# Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
# Distributed under the MIT/X11 software license, see the accompanying
|
||||
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# Mac OS X makefile for bitcoin
|
||||
# Laszlo Hanyecz (solar@heliacal.net)
|
||||
|
||||
DEPSDIR=/Users/macosuser/bitcoin/deps
|
||||
|
||||
INCLUDEPATHS= \
|
||||
-I"$(DEPSDIR)/include"
|
||||
|
||||
LIBPATHS= \
|
||||
-L"$(DEPSDIR)/lib"
|
||||
|
||||
WXLIBS=$(shell $(DEPSDIR)/bin/wx-config --libs --static)
|
||||
|
||||
LIBS= -dead_strip \
|
||||
$(DEPSDIR)/lib/libdb_cxx-4.8.a \
|
||||
$(DEPSDIR)/lib/libboost_system.a \
|
||||
$(DEPSDIR)/lib/libboost_filesystem.a \
|
||||
$(DEPSDIR)/lib/libcrypto.a
|
||||
|
||||
WXDEFS=$(shell $(DEPSDIR)/bin/wx-config --cxxflags) -DNOPCH -DMSG_NOSIGNAL=0
|
||||
|
||||
DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0
|
||||
# ppc doesn't work because we don't support big-endian
|
||||
CFLAGS=-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(WXDEFS) $(INCLUDEPATHS)
|
||||
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 init.h sha.h
|
||||
|
||||
|
||||
all: bitcoin
|
||||
|
||||
|
||||
obj/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -o $@ $<
|
||||
|
||||
obj/sha.o: sha.cpp sha.h
|
||||
g++ -c $(CFLAGS) -O3 -o $@ $<
|
||||
|
||||
OBJS= \
|
||||
obj/util.o \
|
||||
obj/script.o \
|
||||
obj/db.o \
|
||||
obj/net.o \
|
||||
obj/irc.o \
|
||||
obj/main.o \
|
||||
obj/rpc.o \
|
||||
obj/init.o
|
||||
|
||||
bitcoin: $(OBJS) obj/ui.o obj/uibase.o obj/sha.o
|
||||
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
|
||||
|
||||
|
||||
obj/nogui/%.o: %.cpp $(HEADERS)
|
||||
g++ -c $(CFLAGS) -DwxUSE_GUI=0 -o $@ $<
|
||||
|
||||
bitcoind: $(OBJS:obj/%=obj/nogui/%) obj/sha.o
|
||||
g++ $(CFLAGS) -o $@ $(LIBPATHS) $^ $(WXLIBS) $(LIBS)
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f obj/*.o
|
||||
-rm -f obj/nogui/*.o
|
||||
15
net.cpp
15
net.cpp
@@ -968,9 +968,9 @@ bool OpenNetworkConnection(const CAddress& addrConnect)
|
||||
if (addrLocalHost.IsRoutable() && !fUseProxy)
|
||||
{
|
||||
// Advertise our address
|
||||
vector<CAddress> vAddrToSend;
|
||||
vAddrToSend.push_back(addrLocalHost);
|
||||
pnode->PushMessage("addr", vAddrToSend);
|
||||
vector<CAddress> vAddr;
|
||||
vAddr.push_back(addrLocalHost);
|
||||
pnode->PushMessage("addr", vAddr);
|
||||
}
|
||||
|
||||
// Get as many addresses as we can
|
||||
@@ -1019,7 +1019,6 @@ void ThreadMessageHandler2(void* parg)
|
||||
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
|
||||
while (!fShutdown)
|
||||
{
|
||||
// Poll the connected nodes for messages
|
||||
vector<CNode*> vNodesCopy;
|
||||
CRITICAL_BLOCK(cs_vNodes)
|
||||
{
|
||||
@@ -1027,6 +1026,11 @@ void ThreadMessageHandler2(void* parg)
|
||||
foreach(CNode* pnode, vNodesCopy)
|
||||
pnode->AddRef();
|
||||
}
|
||||
|
||||
// Poll the connected nodes for messages
|
||||
CNode* pnodeTrickle = NULL;
|
||||
if (!vNodesCopy.empty())
|
||||
pnodeTrickle = vNodesCopy[GetRand(vNodesCopy.size())];
|
||||
foreach(CNode* pnode, vNodesCopy)
|
||||
{
|
||||
// Receive messages
|
||||
@@ -1037,10 +1041,11 @@ void ThreadMessageHandler2(void* parg)
|
||||
|
||||
// Send messages
|
||||
TRY_CRITICAL_BLOCK(pnode->cs_vSend)
|
||||
SendMessages(pnode);
|
||||
SendMessages(pnode, pnode == pnodeTrickle);
|
||||
if (fShutdown)
|
||||
return;
|
||||
}
|
||||
|
||||
CRITICAL_BLOCK(cs_vNodes)
|
||||
{
|
||||
foreach(CNode* pnode, vNodesCopy)
|
||||
|
||||
62
net.h
62
net.h
@@ -8,10 +8,11 @@ class CInv;
|
||||
class CRequestTracker;
|
||||
class CNode;
|
||||
class CBlockIndex;
|
||||
extern int nBestHeight;
|
||||
|
||||
|
||||
|
||||
static const unsigned short DEFAULT_PORT = htons(8333);
|
||||
#define DEFAULT_PORT htons(8333)
|
||||
static const unsigned int PUBLISH_HOPS = 5;
|
||||
enum
|
||||
{
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
char pchMessageStart[sizeof(::pchMessageStart)];
|
||||
char pchCommand[COMMAND_SIZE];
|
||||
unsigned int nMessageSize;
|
||||
//unsigned int nChecksum;
|
||||
unsigned int nChecksum;
|
||||
|
||||
CMessageHeader()
|
||||
{
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
memset(pchCommand, 0, sizeof(pchCommand));
|
||||
pchCommand[1] = 1;
|
||||
nMessageSize = -1;
|
||||
//nChecksum = 0;
|
||||
nChecksum = 0;
|
||||
}
|
||||
|
||||
CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn)
|
||||
@@ -75,6 +76,7 @@ public:
|
||||
memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
|
||||
strncpy(pchCommand, pszCommand, COMMAND_SIZE);
|
||||
nMessageSize = nMessageSizeIn;
|
||||
nChecksum = 0;
|
||||
}
|
||||
|
||||
IMPLEMENT_SERIALIZE
|
||||
@@ -82,8 +84,8 @@ public:
|
||||
READWRITE(FLATDATA(pchMessageStart));
|
||||
READWRITE(FLATDATA(pchCommand));
|
||||
READWRITE(nMessageSize);
|
||||
//if (nVersion >= 209 && GetCommand() != "version")
|
||||
// READWRITE(nChecksum);
|
||||
if (nVersion >= 209)
|
||||
READWRITE(nChecksum);
|
||||
)
|
||||
|
||||
string GetCommand()
|
||||
@@ -287,16 +289,24 @@ public:
|
||||
|
||||
bool IsRoutable() const
|
||||
{
|
||||
return !(GetByte(3) == 10 ||
|
||||
(GetByte(3) == 192 && GetByte(2) == 168) ||
|
||||
GetByte(3) == 127 ||
|
||||
GetByte(3) == 0 ||
|
||||
ip == 0 ||
|
||||
ip == INADDR_NONE);
|
||||
return IsValid() &&
|
||||
!(GetByte(3) == 10 ||
|
||||
(GetByte(3) == 192 && GetByte(2) == 168) ||
|
||||
GetByte(3) == 127 ||
|
||||
GetByte(3) == 0);
|
||||
}
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
// Clean up 3-byte shifted addresses caused by garbage in size field
|
||||
// of addr messages from versions before 0.2.9 checksum.
|
||||
// Two consecutive addr messages look like this:
|
||||
// header20 vectorlen3 addr26 addr26 addr26 header20 vectorlen3 addr26 addr26 addr26...
|
||||
// so if the first length field is garbled, it reads the second batch
|
||||
// of addr misaligned by 3 bytes.
|
||||
if (memcmp(pchReserved, pchIPv4+3, sizeof(pchIPv4)-3) == 0)
|
||||
return false;
|
||||
|
||||
return (ip != 0 && ip != INADDR_NONE && port != htons(USHRT_MAX));
|
||||
}
|
||||
|
||||
@@ -475,6 +485,7 @@ extern CAddress addrProxy;
|
||||
|
||||
|
||||
|
||||
|
||||
class CNode
|
||||
{
|
||||
public:
|
||||
@@ -507,6 +518,7 @@ public:
|
||||
uint256 hashContinue;
|
||||
CBlockIndex* pindexLastGetBlocksBegin;
|
||||
uint256 hashLastGetBlocksEnd;
|
||||
int nStartingHeight;
|
||||
|
||||
// flood
|
||||
vector<CAddress> vAddrToSend;
|
||||
@@ -518,7 +530,6 @@ public:
|
||||
vector<CInv> vInventoryToSend;
|
||||
CCriticalSection cs_inventory;
|
||||
multimap<int64, CInv> mapAskFor;
|
||||
int64 nNextSendTxInv;
|
||||
|
||||
// publish and subscription
|
||||
vector<char> vfSubscribe;
|
||||
@@ -529,7 +540,15 @@ public:
|
||||
nServices = 0;
|
||||
hSocket = hSocketIn;
|
||||
vSend.SetType(SER_NETWORK);
|
||||
vSend.SetVersion(0);
|
||||
vRecv.SetType(SER_NETWORK);
|
||||
vRecv.SetVersion(0);
|
||||
// Version 0.2 obsoletes 20 Feb 2012
|
||||
if (GetTime() > 1329696000)
|
||||
{
|
||||
vSend.SetVersion(209);
|
||||
vRecv.SetVersion(209);
|
||||
}
|
||||
nLastSend = 0;
|
||||
nLastRecv = 0;
|
||||
nLastSendEmpty = GetTime();
|
||||
@@ -548,8 +567,8 @@ public:
|
||||
hashContinue = 0;
|
||||
pindexLastGetBlocksBegin = 0;
|
||||
hashLastGetBlocksEnd = 0;
|
||||
nStartingHeight = -1;
|
||||
fGetAddr = false;
|
||||
nNextSendTxInv = 0;
|
||||
vfSubscribe.assign(256, false);
|
||||
|
||||
// Push a version message
|
||||
@@ -558,7 +577,8 @@ public:
|
||||
CAddress addrYou = (fUseProxy ? CAddress("0.0.0.0") : addr);
|
||||
CAddress addrMe = (fUseProxy ? CAddress("0.0.0.0") : addrLocalHost);
|
||||
RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
|
||||
PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe, nLocalHostNonce, string(pszSubVer));
|
||||
PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe,
|
||||
nLocalHostNonce, string(pszSubVer), nBestHeight);
|
||||
}
|
||||
|
||||
~CNode()
|
||||
@@ -607,7 +627,7 @@ public:
|
||||
// Known checking here is only to save space from duplicates.
|
||||
// SendMessages will filter it again for knowns that were added
|
||||
// after addresses were pushed.
|
||||
if (!setAddrKnown.count(addr))
|
||||
if (addr.IsValid() && !setAddrKnown.count(addr))
|
||||
vAddrToSend.push_back(addr);
|
||||
}
|
||||
|
||||
@@ -680,10 +700,20 @@ public:
|
||||
if (nHeaderStart == -1)
|
||||
return;
|
||||
|
||||
// Patch in the size
|
||||
// Set the size
|
||||
unsigned int nSize = vSend.size() - nMessageStart;
|
||||
memcpy((char*)&vSend[nHeaderStart] + offsetof(CMessageHeader, nMessageSize), &nSize, sizeof(nSize));
|
||||
|
||||
// Set the checksum
|
||||
if (vSend.GetVersion() >= 209)
|
||||
{
|
||||
uint256 hash = Hash(vSend.begin() + nMessageStart, vSend.end());
|
||||
unsigned int nChecksum = 0;
|
||||
memcpy(&nChecksum, &hash, sizeof(nChecksum));
|
||||
assert(nMessageStart - nHeaderStart >= offsetof(CMessageHeader, nChecksum) + sizeof(nChecksum));
|
||||
memcpy((char*)&vSend[nHeaderStart] + offsetof(CMessageHeader, nChecksum), &nChecksum, sizeof(nChecksum));
|
||||
}
|
||||
|
||||
printf("(%d bytes) ", nSize);
|
||||
printf("\n");
|
||||
|
||||
|
||||
444
rpc.cpp
444
rpc.cpp
@@ -18,6 +18,8 @@ using boost::asio::ip::tcp;
|
||||
using namespace json_spirit;
|
||||
|
||||
void ThreadRPCServer2(void* parg);
|
||||
typedef Value(*rpcfn_type)(const Array& params, bool fHelp);
|
||||
extern map<string, rpcfn_type> mapCallTable;
|
||||
|
||||
|
||||
|
||||
@@ -26,16 +28,45 @@ void ThreadRPCServer2(void* parg);
|
||||
|
||||
|
||||
///
|
||||
/// Note: I'm not finished designing this interface, it's still subject to change.
|
||||
/// Note: This interface may still be subject to change.
|
||||
///
|
||||
|
||||
|
||||
|
||||
Value stop(const Array& params)
|
||||
Value help(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"stop (no parameters)\n"
|
||||
"help\n"
|
||||
"List commands.");
|
||||
|
||||
string strRet;
|
||||
for (map<string, rpcfn_type>::iterator mi = mapCallTable.begin(); mi != mapCallTable.end(); ++mi)
|
||||
{
|
||||
try
|
||||
{
|
||||
Array params;
|
||||
(*(*mi).second)(params, true);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
// Help text is returned in an exception
|
||||
string strHelp = string(e.what());
|
||||
if (strHelp.find('\n') != -1)
|
||||
strHelp = strHelp.substr(0, strHelp.find('\n'));
|
||||
strRet += strHelp + "\n";
|
||||
}
|
||||
}
|
||||
strRet = strRet.substr(0,strRet.size()-1);
|
||||
return strRet;
|
||||
}
|
||||
|
||||
|
||||
Value stop(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"stop\n"
|
||||
"Stop bitcoin server.");
|
||||
|
||||
// Shutdown will take long enough that the response should get back
|
||||
@@ -44,33 +75,33 @@ Value stop(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value getblockcount(const Array& params)
|
||||
Value getblockcount(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getblockcount (no parameters)\n"
|
||||
"getblockcount\n"
|
||||
"Returns the number of blocks in the longest block chain.");
|
||||
|
||||
return nBestHeight + 1;
|
||||
}
|
||||
|
||||
|
||||
Value getblocknumber(const Array& params)
|
||||
Value getblocknumber(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getblocknumber (no parameters)\n"
|
||||
"getblocknumber\n"
|
||||
"Returns the block number of the latest block in the longest block chain.");
|
||||
|
||||
return nBestHeight;
|
||||
}
|
||||
|
||||
|
||||
Value getconnectioncount(const Array& params)
|
||||
Value getconnectioncount(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getconnectioncount (no parameters)\n"
|
||||
"getconnectioncount\n"
|
||||
"Returns the number of connections to other nodes.");
|
||||
|
||||
return (int)vNodes.size();
|
||||
@@ -89,42 +120,42 @@ double GetDifficulty()
|
||||
return dMinimum / dCurrently;
|
||||
}
|
||||
|
||||
Value getdifficulty(const Array& params)
|
||||
Value getdifficulty(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getdifficulty (no parameters)\n"
|
||||
"getdifficulty\n"
|
||||
"Returns the proof-of-work difficulty as a multiple of the minimum difficulty.");
|
||||
|
||||
return GetDifficulty();
|
||||
}
|
||||
|
||||
|
||||
Value getbalance(const Array& params)
|
||||
Value getbalance(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getbalance (no parameters)\n"
|
||||
"getbalance\n"
|
||||
"Returns the server's available balance.");
|
||||
|
||||
return ((double)GetBalance() / (double)COIN);
|
||||
}
|
||||
|
||||
|
||||
Value getgenerate(const Array& params)
|
||||
Value getgenerate(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getgenerate (no parameters)\n"
|
||||
"getgenerate\n"
|
||||
"Returns true or false.");
|
||||
|
||||
return (bool)fGenerateBitcoins;
|
||||
}
|
||||
|
||||
|
||||
Value setgenerate(const Array& params)
|
||||
Value setgenerate(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() < 1 || params.size() > 2)
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"setgenerate <generate> [genproclimit]\n"
|
||||
"<generate> is true or false to turn generation on or off.\n"
|
||||
@@ -148,11 +179,11 @@ Value setgenerate(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value getinfo(const Array& params)
|
||||
Value getinfo(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() != 0)
|
||||
if (fHelp || params.size() != 0)
|
||||
throw runtime_error(
|
||||
"getinfo (no parameters)");
|
||||
"getinfo");
|
||||
|
||||
Object obj;
|
||||
obj.push_back(Pair("balance", (double)GetBalance() / (double)COIN));
|
||||
@@ -166,9 +197,9 @@ Value getinfo(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value getnewaddress(const Array& params)
|
||||
Value getnewaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() > 1)
|
||||
if (fHelp || params.size() > 1)
|
||||
throw runtime_error(
|
||||
"getnewaddress [label]\n"
|
||||
"Returns a new bitcoin address for receiving payments. "
|
||||
@@ -188,9 +219,76 @@ Value getnewaddress(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value sendtoaddress(const Array& params)
|
||||
Value setlabel(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() < 2 || params.size() > 4)
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"setlabel <bitcoinaddress> <label>\n"
|
||||
"Sets the label associated with the given address.");
|
||||
|
||||
string strAddress = params[0].get_str();
|
||||
string strLabel;
|
||||
if (params.size() > 1)
|
||||
strLabel = params[1].get_str();
|
||||
|
||||
SetAddressBookName(strAddress, strLabel);
|
||||
return Value::null;
|
||||
}
|
||||
|
||||
|
||||
Value getlabel(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"getlabel <bitcoinaddress>\n"
|
||||
"Returns the label associated with the given address.");
|
||||
|
||||
string strAddress = params[0].get_str();
|
||||
|
||||
string strLabel;
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
{
|
||||
map<string, string>::iterator mi = mapAddressBook.find(strAddress);
|
||||
if (mi != mapAddressBook.end() && !(*mi).second.empty())
|
||||
strLabel = (*mi).second;
|
||||
}
|
||||
return strLabel;
|
||||
}
|
||||
|
||||
|
||||
Value getaddressesbylabel(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() != 1)
|
||||
throw runtime_error(
|
||||
"getaddressesbylabel <label>\n"
|
||||
"Returns the list of addresses with the given label.");
|
||||
|
||||
string strLabel = params[0].get_str();
|
||||
|
||||
// Find all addresses that have the given label
|
||||
Array ret;
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
{
|
||||
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
|
||||
{
|
||||
const string& strAddress = item.first;
|
||||
const string& strName = item.second;
|
||||
if (strName == strLabel)
|
||||
{
|
||||
// We're only adding valid bitcoin addresses and not ip addresses
|
||||
CScript scriptPubKey;
|
||||
if (scriptPubKey.SetBitcoinAddress(strAddress))
|
||||
ret.push_back(strAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Value sendtoaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() < 2 || params.size() > 4)
|
||||
throw runtime_error(
|
||||
"sendtoaddress <bitcoinaddress> <amount> [comment] [comment-to]\n"
|
||||
"<amount> is a real and is rounded to the nearest 0.01");
|
||||
@@ -216,9 +314,9 @@ Value sendtoaddress(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value listtransactions(const Array& params)
|
||||
Value listtransactions(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() > 2)
|
||||
if (fHelp || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"listtransactions [count=10] [includegenerated=false]\n"
|
||||
"Returns up to [count] most recent transactions.");
|
||||
@@ -237,11 +335,11 @@ Value listtransactions(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value getamountreceived(const Array& params)
|
||||
Value getreceivedbyaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (params.size() < 1 || params.size() > 2)
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"getamountreceived <bitcoinaddress> [minconf=1]\n"
|
||||
"getreceivedbyaddress <bitcoinaddress> [minconf=1]\n"
|
||||
"Returns the total amount received by <bitcoinaddress> in transactions with at least [minconf] confirmations.");
|
||||
|
||||
// Bitcoin address
|
||||
@@ -249,6 +347,8 @@ Value getamountreceived(const Array& params)
|
||||
CScript scriptPubKey;
|
||||
if (!scriptPubKey.SetBitcoinAddress(strAddress))
|
||||
throw runtime_error("Invalid bitcoin address");
|
||||
if (!IsMine(scriptPubKey))
|
||||
return (double)0.0;
|
||||
|
||||
// Minimum confirmations
|
||||
int nMinDepth = 1;
|
||||
@@ -276,6 +376,59 @@ Value getamountreceived(const Array& params)
|
||||
}
|
||||
|
||||
|
||||
Value getreceivedbylabel(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"getreceivedbylabel <label> [minconf=1]\n"
|
||||
"Returns the total amount received by addresses with <label> in transactions with at least [minconf] confirmations.");
|
||||
|
||||
// Get the set of pub keys that have the label
|
||||
string strLabel = params[0].get_str();
|
||||
set<CScript> setPubKey;
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
{
|
||||
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
|
||||
{
|
||||
const string& strAddress = item.first;
|
||||
const string& strName = item.second;
|
||||
if (strName == strLabel)
|
||||
{
|
||||
// We're only counting our own valid bitcoin addresses and not ip addresses
|
||||
CScript scriptPubKey;
|
||||
if (scriptPubKey.SetBitcoinAddress(strAddress))
|
||||
if (IsMine(scriptPubKey))
|
||||
setPubKey.insert(scriptPubKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Minimum confirmations
|
||||
int nMinDepth = 1;
|
||||
if (params.size() > 1)
|
||||
nMinDepth = params[1].get_int();
|
||||
|
||||
// Tally
|
||||
int64 nAmount = 0;
|
||||
CRITICAL_BLOCK(cs_mapWallet)
|
||||
{
|
||||
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
|
||||
{
|
||||
const CWalletTx& wtx = (*it).second;
|
||||
if (wtx.IsCoinBase() || !wtx.IsFinal())
|
||||
continue;
|
||||
|
||||
foreach(const CTxOut& txout, wtx.vout)
|
||||
if (setPubKey.count(txout.scriptPubKey))
|
||||
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
||||
nAmount += txout.nValue;
|
||||
}
|
||||
}
|
||||
|
||||
return (double)nAmount / (double)COIN;
|
||||
}
|
||||
|
||||
|
||||
struct tallyitem
|
||||
{
|
||||
int64 nAmount;
|
||||
@@ -287,23 +440,18 @@ struct tallyitem
|
||||
}
|
||||
};
|
||||
|
||||
Value getallreceived(const Array& params)
|
||||
Value ListReceived(const Array& params, bool fByLabels)
|
||||
{
|
||||
if (params.size() > 1)
|
||||
throw runtime_error(
|
||||
"getallreceived [minconf=1]\n"
|
||||
"[minconf] is the minimum number of confirmations before payments are included.\n"
|
||||
"Returns an array of objects containing:\n"
|
||||
" \"address\" : receiving address\n"
|
||||
" \"amount\" : total amount received by the address\n"
|
||||
" \"confirmations\" : number of confirmations of the most recent transaction included\n"
|
||||
" \"label\" : the label of the receiving address");
|
||||
|
||||
// Minimum confirmations
|
||||
int nMinDepth = 1;
|
||||
if (params.size() > 0)
|
||||
nMinDepth = params[0].get_int();
|
||||
|
||||
// Whether to include empty accounts
|
||||
bool fIncludeEmpty = false;
|
||||
if (params.size() > 1)
|
||||
fIncludeEmpty = params[1].get_bool();
|
||||
|
||||
// Tally
|
||||
map<uint160, tallyitem> mapTally;
|
||||
CRITICAL_BLOCK(cs_mapWallet)
|
||||
@@ -318,18 +466,11 @@ Value getallreceived(const Array& params)
|
||||
if (nDepth < nMinDepth)
|
||||
continue;
|
||||
|
||||
// Filter out debits and payments to self, which may have change return
|
||||
// we don't want to count.
|
||||
int64 nCredit = wtx.GetCredit(true);
|
||||
int64 nDebit = wtx.GetDebit();
|
||||
int64 nNet = nCredit - nDebit;
|
||||
if (nNet <= 0)
|
||||
continue;
|
||||
|
||||
foreach(const CTxOut& txout, wtx.vout)
|
||||
{
|
||||
// Only counting our own bitcoin addresses and not ip addresses
|
||||
uint160 hash160 = txout.scriptPubKey.GetBitcoinAddressHash160();
|
||||
if (hash160 == 0 || !mapPubKeys.count(hash160))
|
||||
if (hash160 == 0 || !mapPubKeys.count(hash160)) // IsMine
|
||||
continue;
|
||||
|
||||
tallyitem& item = mapTally[hash160];
|
||||
@@ -341,27 +482,100 @@ Value getallreceived(const Array& params)
|
||||
|
||||
// Reply
|
||||
Array ret;
|
||||
map<string, tallyitem> mapLabelTally;
|
||||
CRITICAL_BLOCK(cs_mapAddressBook)
|
||||
{
|
||||
for (map<uint160, tallyitem>::iterator it = mapTally.begin(); it != mapTally.end(); ++it)
|
||||
foreach(const PAIRTYPE(string, string)& item, mapAddressBook)
|
||||
{
|
||||
string strAddress = Hash160ToAddress((*it).first);
|
||||
string strLabel;
|
||||
map<string, string>::iterator mi = mapAddressBook.find(strAddress);
|
||||
if (mi != mapAddressBook.end())
|
||||
strLabel = (*mi).second;
|
||||
const string& strAddress = item.first;
|
||||
const string& strLabel = item.second;
|
||||
uint160 hash160;
|
||||
if (!AddressToHash160(strAddress, hash160))
|
||||
continue;
|
||||
map<uint160, tallyitem>::iterator it = mapTally.find(hash160);
|
||||
if (it == mapTally.end() && !fIncludeEmpty)
|
||||
continue;
|
||||
|
||||
int64 nAmount = 0;
|
||||
int nConf = INT_MAX;
|
||||
if (it != mapTally.end())
|
||||
{
|
||||
nAmount = (*it).second.nAmount;
|
||||
nConf = (*it).second.nConf;
|
||||
}
|
||||
|
||||
if (fByLabels)
|
||||
{
|
||||
tallyitem& item = mapLabelTally[strLabel];
|
||||
item.nAmount += nAmount;
|
||||
item.nConf = min(item.nConf, nConf);
|
||||
}
|
||||
else
|
||||
{
|
||||
Object obj;
|
||||
obj.push_back(Pair("address", strAddress));
|
||||
obj.push_back(Pair("label", strLabel));
|
||||
obj.push_back(Pair("amount", (double)nAmount / (double)COIN));
|
||||
obj.push_back(Pair("confirmations", (nConf == INT_MAX ? 0 : nConf)));
|
||||
ret.push_back(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fByLabels)
|
||||
{
|
||||
for (map<string, tallyitem>::iterator it = mapLabelTally.begin(); it != mapLabelTally.end(); ++it)
|
||||
{
|
||||
int64 nAmount = (*it).second.nAmount;
|
||||
int nConf = (*it).second.nConf;
|
||||
Object obj;
|
||||
obj.push_back(Pair("address", strAddress));
|
||||
obj.push_back(Pair("amount", (double)(*it).second.nAmount / (double)COIN));
|
||||
obj.push_back(Pair("confirmations", (*it).second.nConf));
|
||||
obj.push_back(Pair("label", strLabel));
|
||||
obj.push_back(Pair("label", (*it).first));
|
||||
obj.push_back(Pair("amount", (double)nAmount / (double)COIN));
|
||||
obj.push_back(Pair("confirmations", (nConf == INT_MAX ? 0 : nConf)));
|
||||
ret.push_back(obj);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Value listreceivedbyaddress(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"listreceivedbyaddress [minconf=1] [includeempty=false]\n"
|
||||
"[minconf] is the minimum number of confirmations before payments are included.\n"
|
||||
"[includeempty] whether to include addresses that haven't received any payments.\n"
|
||||
"Returns an array of objects containing:\n"
|
||||
" \"address\" : receiving address\n"
|
||||
" \"label\" : the label of the receiving address\n"
|
||||
" \"amount\" : total amount received by the address\n"
|
||||
" \"confirmations\" : number of confirmations of the most recent transaction included");
|
||||
|
||||
return ListReceived(params, false);
|
||||
}
|
||||
|
||||
Value listreceivedbylabel(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 2)
|
||||
throw runtime_error(
|
||||
"listreceivedbylabel [minconf=1] [includeempty=false]\n"
|
||||
"[minconf] is the minimum number of confirmations before payments are included.\n"
|
||||
"[includeempty] whether to include labels that haven't received any payments.\n"
|
||||
"Returns an array of objects containing:\n"
|
||||
" \"label\" : the label of the receiving addresses\n"
|
||||
" \"amount\" : total amount received by addresses with this label\n"
|
||||
" \"confirmations\" : number of confirmations of the most recent transaction included");
|
||||
|
||||
return ListReceived(params, true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -372,23 +586,30 @@ Value getallreceived(const Array& params)
|
||||
// Call Table
|
||||
//
|
||||
|
||||
typedef Value(*rpcfn_type)(const Array& params);
|
||||
pair<string, rpcfn_type> pCallTable[] =
|
||||
{
|
||||
make_pair("stop", &stop),
|
||||
make_pair("getblockcount", &getblockcount),
|
||||
make_pair("getblocknumber", &getblocknumber),
|
||||
make_pair("getconnectioncount", &getconnectioncount),
|
||||
make_pair("getdifficulty", &getdifficulty),
|
||||
make_pair("getbalance", &getbalance),
|
||||
make_pair("getgenerate", &getgenerate),
|
||||
make_pair("setgenerate", &setgenerate),
|
||||
make_pair("getinfo", &getinfo),
|
||||
make_pair("getnewaddress", &getnewaddress),
|
||||
make_pair("sendtoaddress", &sendtoaddress),
|
||||
make_pair("listtransactions", &listtransactions),
|
||||
make_pair("getamountreceived", &getamountreceived),
|
||||
make_pair("getallreceived", &getallreceived),
|
||||
make_pair("help", &help),
|
||||
make_pair("stop", &stop),
|
||||
make_pair("getblockcount", &getblockcount),
|
||||
make_pair("getblocknumber", &getblocknumber),
|
||||
make_pair("getconnectioncount", &getconnectioncount),
|
||||
make_pair("getdifficulty", &getdifficulty),
|
||||
make_pair("getbalance", &getbalance),
|
||||
make_pair("getgenerate", &getgenerate),
|
||||
make_pair("setgenerate", &setgenerate),
|
||||
make_pair("getinfo", &getinfo),
|
||||
make_pair("getnewaddress", &getnewaddress),
|
||||
make_pair("setlabel", &setlabel),
|
||||
make_pair("getlabel", &getlabel),
|
||||
make_pair("getaddressesbylabel", &getaddressesbylabel),
|
||||
make_pair("sendtoaddress", &sendtoaddress),
|
||||
make_pair("listtransactions", &listtransactions),
|
||||
make_pair("getamountreceived", &getreceivedbyaddress), // deprecated, renamed to getreceivedbyaddress
|
||||
make_pair("getallreceived", &listreceivedbyaddress), // deprecated, renamed to listreceivedbyaddress
|
||||
make_pair("getreceivedbyaddress", &getreceivedbyaddress),
|
||||
make_pair("getreceivedbylabel", &getreceivedbylabel),
|
||||
make_pair("listreceivedbyaddress", &listreceivedbyaddress),
|
||||
make_pair("listreceivedbylabel", &listreceivedbylabel),
|
||||
};
|
||||
map<string, rpcfn_type> mapCallTable(pCallTable, pCallTable + sizeof(pCallTable)/sizeof(pCallTable[0]));
|
||||
|
||||
@@ -570,7 +791,7 @@ void ThreadRPCServer2(void* parg)
|
||||
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);
|
||||
if (mi == mapCallTable.end())
|
||||
throw runtime_error("Method not found.");
|
||||
Value result = (*(*mi).second)(params);
|
||||
Value result = (*(*mi).second)(params, false);
|
||||
|
||||
// Send reply
|
||||
string strReply = JSONRPCReply(result, Value::null, id);
|
||||
@@ -657,25 +878,50 @@ int CommandLineRPC(int argc, char *argv[])
|
||||
if (!mapCallTable.count(strMethod))
|
||||
throw runtime_error(strprintf("unknown command: %s", strMethod.c_str()));
|
||||
|
||||
// Parameters default to strings
|
||||
Array params;
|
||||
for (int i = 2; i < argc; i++)
|
||||
params.push_back(argv[i]);
|
||||
int n = params.size();
|
||||
Value result;
|
||||
if (argc == 3 && strcmp(argv[2], "-?") == 0)
|
||||
{
|
||||
// Call help locally, help text is returned in an exception
|
||||
try
|
||||
{
|
||||
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);
|
||||
Array params;
|
||||
(*(*mi).second)(params, true);
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
result = e.what();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Parameters default to strings
|
||||
Array params;
|
||||
for (int i = 2; i < argc; i++)
|
||||
params.push_back(argv[i]);
|
||||
int n = params.size();
|
||||
|
||||
//
|
||||
// Special case other types
|
||||
//
|
||||
if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]);
|
||||
if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);
|
||||
if (strMethod == "listtransactions" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
if (strMethod == "listtransactions" && n > 1) ConvertTo<bool>(params[1]);
|
||||
if (strMethod == "getamountreceived" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "getallreceived" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
//
|
||||
// Special case non-string parameter types
|
||||
//
|
||||
if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]);
|
||||
if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]);
|
||||
if (strMethod == "listtransactions" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
if (strMethod == "listtransactions" && n > 1) ConvertTo<bool>(params[1]);
|
||||
if (strMethod == "getamountreceived" && n > 1) ConvertTo<boost::int64_t>(params[1]); // deprecated
|
||||
if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "getreceivedbylabel" && n > 1) ConvertTo<boost::int64_t>(params[1]);
|
||||
if (strMethod == "getallreceived" && n > 0) ConvertTo<boost::int64_t>(params[0]); // deprecated
|
||||
if (strMethod == "getallreceived" && n > 1) ConvertTo<bool>(params[1]);
|
||||
if (strMethod == "listreceivedbyaddress" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
if (strMethod == "listreceivedbyaddress" && n > 1) ConvertTo<bool>(params[1]);
|
||||
if (strMethod == "listreceivedbylabel" && n > 0) ConvertTo<boost::int64_t>(params[0]);
|
||||
if (strMethod == "listreceivedbylabel" && n > 1) ConvertTo<bool>(params[1]);
|
||||
|
||||
// Execute
|
||||
Value result = CallRPC(strMethod, params);
|
||||
// Execute
|
||||
result = CallRPC(strMethod, params);
|
||||
}
|
||||
|
||||
// Print result
|
||||
string strResult = (result.type() == str_type ? result.get_str() : write_string(result, true));
|
||||
|
||||
14
serialize.h
14
serialize.h
@@ -19,7 +19,7 @@ class CScript;
|
||||
class CDataStream;
|
||||
class CAutoFile;
|
||||
|
||||
static const int VERSION = 208;
|
||||
static const int VERSION = 211;
|
||||
static const char* pszSubVer = ".0";
|
||||
|
||||
|
||||
@@ -809,6 +809,18 @@ public:
|
||||
vch.insert(it, first, last);
|
||||
}
|
||||
|
||||
void insert(iterator it, vector<char>::const_iterator first, vector<char>::const_iterator last)
|
||||
{
|
||||
if (it == vch.begin() + nReadPos && last - first <= nReadPos)
|
||||
{
|
||||
// special case for inserting at the front when there's room
|
||||
nReadPos -= (last - first);
|
||||
memcpy(&vch[nReadPos], &first[0], last - first);
|
||||
}
|
||||
else
|
||||
vch.insert(it, first, last);
|
||||
}
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1300
|
||||
void insert(iterator it, const char* first, const char* last)
|
||||
{
|
||||
|
||||
18
ui.cpp
18
ui.cpp
@@ -193,6 +193,12 @@ bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* pa
|
||||
return (ThreadSafeMessageBox(strMessage, strCaption, wxYES_NO, parent) == wxYES);
|
||||
}
|
||||
|
||||
void CalledSetStatusBar(const string& strText, int nField)
|
||||
{
|
||||
if (pframeMain && pframeMain->m_statusBar)
|
||||
pframeMain->m_statusBar->SetStatusText(strText, nField);
|
||||
}
|
||||
|
||||
void SetDefaultReceivingAddress(const string& strAddress)
|
||||
{
|
||||
// Update main window address and database
|
||||
@@ -268,7 +274,8 @@ CMainFrame::CMainFrame(wxWindow* parent) : CMainFrameBase(parent)
|
||||
if (!strstr(DateTimeStr(1229413914).c_str(), "2008"))
|
||||
nDateWidth += 12;
|
||||
#ifdef __WXMAC__
|
||||
nDateWidth += 2;
|
||||
nDateWidth += 5;
|
||||
dResize -= 0.01;
|
||||
#endif
|
||||
wxListCtrl* pplistCtrl[] = {m_listCtrlAll, m_listCtrlSentReceived, m_listCtrlSent, m_listCtrlReceived};
|
||||
foreach(wxListCtrl* p, pplistCtrl)
|
||||
@@ -1009,6 +1016,11 @@ void CMainFrame::OnPaintListCtrl(wxPaintEvent& event)
|
||||
|
||||
if (fDebug && GetTime() - nThreadSocketHandlerHeartbeat > 60)
|
||||
m_statusBar->SetStatusText(" ERROR: ThreadSocketHandler has stopped", 0);
|
||||
|
||||
// Update receiving address
|
||||
string strDefaultAddress = PubKeyToAddress(vchDefaultKey);
|
||||
if (m_textCtrlAddress->GetValue() != strDefaultAddress)
|
||||
m_textCtrlAddress->SetValue(strDefaultAddress);
|
||||
}
|
||||
|
||||
|
||||
@@ -2080,7 +2092,9 @@ void CSendingDialog::OnReply2(CDataStream& vRecv)
|
||||
}
|
||||
|
||||
// Send payment tx to seller, with response going to OnReply3 via event handler
|
||||
pnode->PushRequest("submitorder", wtx, SendingDialogOnReply3, this);
|
||||
CWalletTx wtxSend = wtx;
|
||||
wtxSend.fFromMe = false;
|
||||
pnode->PushRequest("submitorder", wtxSend, SendingDialogOnReply3, this);
|
||||
|
||||
Status(_("Waiting for confirmation..."));
|
||||
MainFrameRepaint();
|
||||
|
||||
9
ui.h
9
ui.h
@@ -30,6 +30,7 @@ string FormatTxStatus(const CWalletTx& wtx);
|
||||
void UIThreadCall(boost::function0<void>);
|
||||
int ThreadSafeMessageBox(const string& message, const string& caption="Message", int style=wxOK, wxWindow* parent=NULL, int x=-1, int y=-1);
|
||||
bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWindow* parent);
|
||||
void CalledSetStatusBar(const string& strText, int nField);
|
||||
void MainFrameRepaint();
|
||||
void CreateMainWindow();
|
||||
|
||||
@@ -48,6 +49,14 @@ inline bool ThreadSafeAskFee(int64 nFeeRequired, const string& strCaption, wxWin
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void CalledSetStatusBar(const string& strText, int nField)
|
||||
{
|
||||
}
|
||||
|
||||
inline void UIThreadCall(boost::function0<void> fn)
|
||||
{
|
||||
}
|
||||
|
||||
inline void MainFrameRepaint()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ CSendDialogBase::CSendDialogBase( wxWindow* parent, wxWindowID id, const wxStrin
|
||||
|
||||
fgSizer1->Add( 0, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
m_staticTextInstructions = new wxStaticText( this, wxID_ANY, _("Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, \nor Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextInstructions = new wxStaticText( this, wxID_ANY, _("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextInstructions->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextInstructions, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
4
uibase.h
4
uibase.h
@@ -77,7 +77,6 @@ class CMainFrameBase : public wxFrame
|
||||
wxMenu* m_menuFile;
|
||||
wxMenu* m_menuHelp;
|
||||
wxToolBar* m_toolBar;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
wxStaticText* m_staticText32;
|
||||
wxButton* m_buttonNew;
|
||||
@@ -121,6 +120,7 @@ class CMainFrameBase : public wxFrame
|
||||
|
||||
public:
|
||||
wxMenu* m_menuOptions;
|
||||
wxStatusBar* m_statusBar;
|
||||
wxTextCtrl* m_textCtrlAddress;
|
||||
wxListCtrl* m_listCtrlAll;
|
||||
wxListCtrl* m_listCtrlSentReceived;
|
||||
@@ -275,7 +275,7 @@ class CSendDialogBase : public wxDialog
|
||||
|
||||
|
||||
public:
|
||||
CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,312 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
CSendDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Send Coins"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 675,298 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~CSendDialogBase();
|
||||
|
||||
};
|
||||
|
||||
@@ -388,7 +388,6 @@ typedef base_uint<256> base_uint256;
|
||||
//
|
||||
// uint160 and uint256 could be implemented as templates, but to keep
|
||||
// compile errors and debugging cleaner, they're copy and pasted.
|
||||
// It's safe to search and replace 160 with 256 and vice versa.
|
||||
//
|
||||
|
||||
|
||||
@@ -405,6 +404,8 @@ public:
|
||||
|
||||
uint160()
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
pn[i] = 0;
|
||||
}
|
||||
|
||||
uint160(const basetype& b)
|
||||
@@ -517,6 +518,8 @@ public:
|
||||
|
||||
uint256()
|
||||
{
|
||||
for (int i = 0; i < WIDTH; i++)
|
||||
pn[i] = 0;
|
||||
}
|
||||
|
||||
uint256(const basetype& b)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<property name="relative_path">1</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Frame" expanded="1">
|
||||
<object class="Frame" expanded="0">
|
||||
<property name="bg">wxSYS_COLOUR_BTNFACE</property>
|
||||
<property name="center"></property>
|
||||
<property name="context_help"></property>
|
||||
@@ -293,7 +293,7 @@
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_statusBar</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="permission">public</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxST_SIZEGRIP</property>
|
||||
@@ -3317,7 +3317,7 @@
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">CSendDialogBase</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">675,312</property>
|
||||
<property name="size">675,298</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">Send Coins</property>
|
||||
@@ -3408,7 +3408,7 @@
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Enter the recipient's IP address (e.g. 123.45.6.7) for online transfer with comments and confirmation, 
or Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) if recipient is not online.</property>
|
||||
<property name="label">Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJED9L) or IP address (e.g. 123.45.6.7)</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticTextInstructions</property>
|
||||
|
||||
5
util.cpp
5
util.cpp
@@ -250,11 +250,6 @@ string strprintf(const char* format, ...)
|
||||
if (p == NULL)
|
||||
throw std::bad_alloc();
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
// msvc optimisation
|
||||
if (p == buffer)
|
||||
return string(p, p+ret);
|
||||
#endif
|
||||
string str(p, p+ret);
|
||||
if (p != buffer)
|
||||
delete p;
|
||||
|
||||
9
util.h
9
util.h
@@ -520,8 +520,13 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
|
||||
|
||||
inline void SetThreadPriority(int nPriority)
|
||||
{
|
||||
// threads are processes on linux, so PRIO_PROCESS affects just the one thread
|
||||
setpriority(PRIO_PROCESS, getpid(), nPriority);
|
||||
// It's unclear if it's even possible to change thread priorities on Linux,
|
||||
// but we really and truly need it for the generation threads.
|
||||
#ifdef PRIO_THREAD
|
||||
setpriority(PRIO_THREAD, 0, nPriority);
|
||||
#else
|
||||
setpriority(PRIO_PROCESS, 0, nPriority);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool TerminateThread(pthread_t hthread, unsigned int nExitCode)
|
||||
|
||||
Reference in New Issue
Block a user