diff options
-rw-r--r-- | bitcoin-qt.pro | 4 | ||||
-rw-r--r-- | doc/translation_process.md | 33 | ||||
-rw-r--r-- | src/addrman.cpp | 506 | ||||
-rw-r--r-- | src/addrman.h | 499 | ||||
-rw-r--r-- | src/bitcoinrpc.cpp | 22 | ||||
-rw-r--r-- | src/db.cpp | 231 | ||||
-rw-r--r-- | src/db.h | 4 | ||||
-rw-r--r-- | src/init.cpp | 32 | ||||
-rw-r--r-- | src/irc.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 102 | ||||
-rw-r--r-- | src/makefile.linux-mingw | 1 | ||||
-rw-r--r-- | src/makefile.mingw | 1 | ||||
-rw-r--r-- | src/makefile.osx | 1 | ||||
-rw-r--r-- | src/makefile.unix | 3 | ||||
-rw-r--r-- | src/net.cpp | 251 | ||||
-rw-r--r-- | src/net.h | 6 | ||||
-rw-r--r-- | src/netbase.cpp | 13 | ||||
-rw-r--r-- | src/protocol.h | 2 | ||||
-rw-r--r-- | src/qt/bitcoin.cpp | 2 | ||||
-rw-r--r-- | src/qt/bitcoin.qrc | 1 | ||||
-rw-r--r-- | src/qt/locale/bitcoin_cs_CZ.ts | 1931 | ||||
-rw-r--r-- | src/qt/locale/bitcoin_de.ts | 109 | ||||
-rw-r--r-- | src/qt/locale/bitcoin_en.ts | 248 | ||||
-rw-r--r-- | src/qt/notificator.cpp | 15 | ||||
-rw-r--r-- | src/qt/notificator.h | 3 | ||||
-rw-r--r-- | src/qt/sendcoinsentry.cpp | 1 | ||||
-rw-r--r-- | src/uint256.h | 4 |
27 files changed, 1595 insertions, 2432 deletions
diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro index bd4e083bee..d9206b3bff 100644 --- a/bitcoin-qt.pro +++ b/bitcoin-qt.pro @@ -101,6 +101,7 @@ HEADERS += src/qt/bitcoingui.h \ src/qt/aboutdialog.h \ src/qt/editaddressdialog.h \ src/qt/bitcoinaddressvalidator.h \ + src/addrman.h \ src/base58.h \ src/bignum.h \ src/checkpoints.h \ @@ -175,6 +176,7 @@ SOURCES += src/qt/bitcoin.cpp src/qt/bitcoingui.cpp \ src/net.cpp \ src/irc.cpp \ src/checkpoints.cpp \ + src/addrman.cpp \ src/db.cpp \ src/json/json_spirit_writer.cpp \ src/json/json_spirit_value.cpp \ @@ -244,7 +246,7 @@ CODECFORTR = UTF-8 TRANSLATIONS = $$files(src/qt/locale/bitcoin_*.ts) isEmpty(QMAKE_LRELEASE) { - win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe + win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease } isEmpty(TS_DIR):TS_DIR = src/qt/locale diff --git a/doc/translation_process.md b/doc/translation_process.md index 06ebe711f1..3ddfc0cbf4 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -1,7 +1,7 @@ Translations ============ -The QT GUI can be easily be translated into other languages. Here's how we +The Qt GUI can be easily translated into other languages. Here's how we handle those translations. Files and Folders @@ -30,10 +30,14 @@ This directory contains all translations. Filenames must adhere to this format: #### Source file -`src/qt/locale/bitcoin_en.ts` is a treated in a special way. It is used as the -source for all other translations. Whenever a string in the code is change +`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the +source for all other translations. Whenever a string in the code is changed this file must be updated to reflect those changes. Usually, this can be -accomplished by running `lupdate` +accomplished by running `lupdate` (included in the Qt SDK). + +An updated source file should be merged to github and transifex will pick it +up from there. Afterwards the new strings show up as "Remaining" in transifex +and can be translated. Syncing with transifex ---------------------- @@ -42,9 +46,9 @@ We are using http://transifex.net as a frontend for translating the client. https://www.transifex.net/projects/p/bitcoin/resource/tx/ -The "transifex client":http://help.transifex.net/features/client/index.html -will help with fetching new translations from transifex. - +The "transifex client" (see: http://help.transifex.net/features/client/) +will help with fetching new translations from transifex. Use the following +config to be able to connect with the client. ### .tx/config @@ -55,11 +59,22 @@ will help with fetching new translations from transifex. file_filter = src/qt/locale/bitcoin_<lang>.ts source_file = src/qt/locale/bitcoin_en.ts source_lang = en + +### .tx/config (for Windows) + + [main] + host = https://www.transifex.net + + [bitcoin.tx] + file_filter = src\qt\locale\bitcoin_<lang>.ts + source_file = src\qt\locale\bitcoin_en.ts + source_lang = en + +It is also possible to directly download new translations one by one from transifex. ### Fetching new translations 1. `tx pull -a` -2. update `src/qt/bitcoin.qrc` +2. update `src/qt/bitcoin.qrc` manually or via `ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale/\1.qm<\/file>/'` 3. `git add` new translations from `src/qt/locale/` - diff --git a/src/addrman.cpp b/src/addrman.cpp new file mode 100644 index 0000000000..2ef666cf2c --- /dev/null +++ b/src/addrman.cpp @@ -0,0 +1,506 @@ +// Copyright (c) 2012 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file license.txt or http://www.opensource.org/licenses/mit-license.php. + +#include "addrman.h" + +using namespace std; + +int CAddrInfo::GetTriedBucket(const std::vector<unsigned char> &nKey) const +{ + CDataStream ss1(SER_GETHASH); + std::vector<unsigned char> vchKey = GetKey(); + ss1 << nKey << vchKey; + uint64 hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + + CDataStream ss2(SER_GETHASH); + std::vector<unsigned char> vchGroupKey = GetGroup(); + ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP); + uint64 hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + return hash2 % ADDRMAN_TRIED_BUCKET_COUNT; +} + +int CAddrInfo::GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAddr& src) const +{ + CDataStream ss1(SER_GETHASH); + std::vector<unsigned char> vchGroupKey = GetGroup(); + std::vector<unsigned char> vchSourceGroupKey = src.GetGroup(); + ss1 << nKey << vchGroupKey << vchSourceGroupKey; + uint64 hash1 = Hash(ss1.begin(), ss1.end()).Get64(); + + CDataStream ss2(SER_GETHASH); + ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP); + uint64 hash2 = Hash(ss2.begin(), ss2.end()).Get64(); + return hash2 % ADDRMAN_NEW_BUCKET_COUNT; +} + +bool CAddrInfo::IsTerrible(int64 nNow) const +{ + if (nLastTry && nLastTry >= nNow-60) // never remove things tried the last minute + return false; + + if (nTime > nNow + 10*60) // came in a flying DeLorean + return true; + + if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*86400) // not seen in over a month + return true; + + if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried three times and never a success + return true; + + if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*86400 && nAttempts>=ADDRMAN_MAX_FAILURES) // 10 successive failures in the last week + return true; + + return false; +} + +double CAddrInfo::GetChance(int64 nNow) const +{ + double fChance = 1.0; + + int64 nSinceLastSeen = nNow - nTime; + int64 nSinceLastTry = nNow - nLastTry; + + if (nSinceLastSeen < 0) nSinceLastSeen = 0; + if (nSinceLastTry < 0) nSinceLastTry = 0; + + fChance *= 600.0 / (600.0 + nSinceLastSeen); + + // deprioritize very recent attempts away + if (nSinceLastTry < 60*10) + fChance *= 0.01; + + // deprioritize 50% after each failed attempt + for (int n=0; n<nAttempts; n++) + fChance /= 1.5; + + return fChance; +} + +CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int *pnId) +{ + std::map<CNetAddr, int>::iterator it = mapAddr.find(addr); + if (it == mapAddr.end()) + return NULL; + if (pnId) + *pnId = (*it).second; + std::map<int, CAddrInfo>::iterator it2 = mapInfo.find((*it).second); + if (it2 != mapInfo.end()) + return &(*it2).second; + return NULL; +} + +CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId) +{ + int nId = nIdCount++; + mapInfo[nId] = CAddrInfo(addr, addrSource); + mapAddr[addr] = nId; + mapInfo[nId].nRandomPos = vRandom.size(); + vRandom.push_back(nId); + if (pnId) + *pnId = nId; + return &mapInfo[nId]; +} + +void CAddrMan::SwapRandom(int nRndPos1, int nRndPos2) +{ + if (nRndPos1 == nRndPos2) + return; + + int nId1 = vRandom[nRndPos1]; + int nId2 = vRandom[nRndPos2]; + + mapInfo[nId1].nRandomPos = nRndPos2; + mapInfo[nId2].nRandomPos = nRndPos1; + + vRandom[nRndPos1] = nId2; + vRandom[nRndPos2] = nId1; +} + +int CAddrMan::SelectTried(int nKBucket) +{ + std::vector<int> &vTried = vvTried[nKBucket]; + + // random shuffle the first few elements (using the entire list) + // find the least recently tried among them + int64 nOldest = -1; + for (int i=0; i<ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i<vTried.size(); i++) + { + int nPos = GetRandInt(vTried.size() - i) + i; + int nTemp = vTried[nPos]; + vTried[nPos] = vTried[i]; + vTried[i] = nTemp; + if (nOldest == -1 || mapInfo[nTemp].nLastSuccess < mapInfo[nOldest].nLastSuccess) + nOldest = nTemp; + } + + return nOldest; +} + +int CAddrMan::ShrinkNew(int nUBucket) +{ + std::set<int> &vNew = vvNew[nUBucket]; + + // first look for deletable items + for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) + { + CAddrInfo &info = mapInfo[*it]; + if (info.IsTerrible()) + { + if (--info.nRefCount == 0) + { + SwapRandom(info.nRandomPos, vRandom.size()-1); + vRandom.pop_back(); + mapAddr.erase(info); + mapInfo.erase(*it); + nNew--; + } + vNew.erase(it); + return 0; + } + } + + // otherwise, select four randomly, and pick the oldest of those to replace + int n[4] = {GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size())}; + int nI = 0; + int nOldest = -1; + for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) + { + if (nI == n[0] || nI == n[1] || nI == n[2] || nI == n[3]) + { + if (nOldest == -1 || mapInfo[*it].nTime < mapInfo[nOldest].nTime) + nOldest = *it; + } + nI++; + } + CAddrInfo &info = mapInfo[nOldest]; + if (--info.nRefCount == 0) + { + SwapRandom(info.nRandomPos, vRandom.size()-1); + vRandom.pop_back(); + mapAddr.erase(info); + mapInfo.erase(nOldest); + nNew--; + } + vNew.erase(nOldest); + + return 1; +} + +void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin) +{ + // remove the entry from all new buckets + for (std::vector<std::set<int> >::iterator it = vvNew.begin(); it != vvNew.end(); it++) + { + if ((*it).erase(nId)) + info.nRefCount--; + } + nNew--; + + // what tried bucket to move the entry to + int nKBucket = info.GetTriedBucket(nKey); + std::vector<int> &vTried = vvTried[nKBucket]; + + // first check whether there is place to just add it + if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) + { + vTried.push_back(nId); + nTried++; + info.fInTried = true; + return; + } + + // otherwise, find an item to evict + int nPos = SelectTried(nKBucket); + + // find which new bucket it belongs to + int nUBucket = mapInfo[vTried[nPos]].GetNewBucket(nKey); + std::set<int> &vNew = vvNew[nUBucket]; + + // remove the to-be-replaced tried entry from the tried set + CAddrInfo& infoOld = mapInfo[vTried[nPos]]; + infoOld.fInTried = false; + infoOld.nRefCount = 1; + // do not update nTried, as we are going to move something else there immediately + + // check whether there is place in that one, + if (vNew.size() < ADDRMAN_NEW_BUCKET_SIZE) + { + // if so, move it back there + vNew.insert(vTried[nPos]); + } else { + // otherwise, move it to the new bucket nId came from (there is certainly place there) + vvNew[nOrigin].insert(vTried[nPos]); + } + nNew++; + + vTried[nPos] = nId; + // we just overwrote an entry in vTried; no need to update nTried + info.fInTried = true; + return; +} + +void CAddrMan::Good_(const CService &addr, int64 nTime) +{ +// printf("Good: addr=%s\n", addr.ToString().c_str()); + + int nId; + CAddrInfo *pinfo = Find(addr, &nId); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo &info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.nLastSuccess = nTime; + info.nLastTry = nTime; + info.nTime = nTime; + info.nAttempts = 0; + + // if it is already in the tried set, don't do anything else + if (info.fInTried) + return; + + // find a bucket it is in now + int nRnd = GetRandInt(vvNew.size()); + int nUBucket = -1; + for (int n = 0; n < vvNew.size(); n++) + { + int nB = (n+nRnd) % vvNew.size(); + std::set<int> &vNew = vvNew[nB]; + if (vNew.count(nId)) + { + nUBucket = nB; + break; + } + } + + // if no bucket is found, something bad happened; + // TODO: maybe re-add the node, but for now, just bail out + if (nUBucket == -1) return; + + printf("Moving %s to tried\n", addr.ToString().c_str()); + + // move nId to the tried tables + MakeTried(info, nId, nUBucket); +} + +bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty) +{ + if (!addr.IsRoutable()) + return false; + + bool fNew = false; + int nId; + CAddrInfo *pinfo = Find(addr, &nId); + + if (pinfo) + { + // periodically update nTime + bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60); + int64 nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60); + if (addr.nTime && (!pinfo->nTime || pinfo->nTime < addr.nTime - nUpdateInterval - nTimePenalty)) + pinfo->nTime = max((int64)0, addr.nTime - nTimePenalty); + + // add services + pinfo->nServices |= addr.nServices; + + // do not update if no new information is present + if (!addr.nTime || pinfo->nTime && addr.nTime <= pinfo->nTime) + return false; + + // do not update if the entry was already in the "tried" table + if (pinfo->fInTried) + return false; + + // do not update if the max reference count is reached + if (pinfo->nRefCount == ADDRMAN_NEW_BUCKETS_PER_ADDRESS) + return false; + + // stochastic test: previous nRefCount == N: 2^N times harder to increase it + int nFactor = 1; + for (int n=0; n<pinfo->nRefCount; n++) + nFactor *= 2; + if (nFactor > 1 && (GetRandInt(nFactor) != 0)) + return false; + } else { + pinfo = Create(addr, source, &nId); + pinfo->nTime = max((int64)0, (int64)pinfo->nTime - nTimePenalty); +// printf("Added %s [nTime=%fhr]\n", pinfo->ToString().c_str(), (GetAdjustedTime() - pinfo->nTime) / 3600.0); + nNew++; + fNew = true; + } + + int nUBucket = pinfo->GetNewBucket(nKey, source); + std::set<int> &vNew = vvNew[nUBucket]; + if (!vNew.count(nId)) + { + pinfo->nRefCount++; + if (vNew.size() == ADDRMAN_NEW_BUCKET_SIZE) + ShrinkNew(nUBucket); + vvNew[nUBucket].insert(nId); + } + return fNew; +} + +void CAddrMan::Attempt_(const CService &addr, int64 nTime) +{ + CAddrInfo *pinfo = Find(addr); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo &info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + info.nLastTry = nTime; + info.nAttempts++; +} + +CAddress CAddrMan::Select_(int nUnkBias) +{ + if (size() == 0) + return CAddress(); + + double nCorTried = sqrt(nTried) * (100.0 - nUnkBias); + double nCorNew = sqrt(nNew) * nUnkBias; + if ((nCorTried + nCorNew)*GetRandInt(1<<30)/(1<<30) < nCorTried) + { + // use a tried node + double fChanceFactor = 1.0; + while(1) + { + int nKBucket = GetRandInt(vvTried.size()); + std::vector<int> &vTried = vvTried[nKBucket]; + if (vTried.size() == 0) continue; + int nPos = GetRandInt(vTried.size()); + CAddrInfo &info = mapInfo[vTried[nPos]]; + if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30)) + return info; + fChanceFactor *= 1.2; + } + } else { + // use an new node + double fChanceFactor = 1.0; + while(1) + { + int nUBucket = GetRandInt(vvNew.size()); + std::set<int> &vNew = vvNew[nUBucket]; + if (vNew.size() == 0) continue; + int nPos = GetRandInt(vNew.size()); + std::set<int>::iterator it = vNew.begin(); + while (nPos--) + it++; + CAddrInfo &info = mapInfo[*it]; + if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30)) + return info; + fChanceFactor *= 1.2; + } + } +} + +#ifdef DEBUG_ADDRMAN +int CAddrMan::Check_() +{ + std::set<int> setTried; + std::map<int, int> mapNew; + + if (vRandom.size() != nTried + nNew) return -7; + + for (std::map<int, CAddrInfo>::iterator it = mapInfo.begin(); it != mapInfo.end(); it++) + { + int n = (*it).first; + CAddrInfo &info = (*it).second; + if (info.fInTried) + { + + if (!info.nLastSuccess) return -1; + if (info.nRefCount) return -2; + setTried.insert(n); + } else { + if (info.nRefCount < 0 || info.nRefCount > ADDRMAN_NEW_BUCKETS_PER_ADDRESS) return -3; + if (!info.nRefCount) return -4; + mapNew[n] = info.nRefCount; + } + if (mapAddr[info] != n) return -5; + if (info.nRandomPos<0 || info.nRandomPos>=vRandom.size() || vRandom[info.nRandomPos] != n) return -14; + if (info.nLastTry < 0) return -6; + if (info.nLastSuccess < 0) return -8; + } + + if (setTried.size() != nTried) return -9; + if (mapNew.size() != nNew) return -10; + + for (int n=0; n<vvTried.size(); n++) + { + std::vector<int> &vTried = vvTried[n]; + for (std::vector<int>::iterator it = vTried.begin(); it != vTried.end(); it++) + { + if (!setTried.count(*it)) return -11; + setTried.erase(*it); + } + } + + for (int n=0; n<vvNew.size(); n++) + { + std::set<int> &vNew = vvNew[n]; + for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) + { + if (!mapNew.count(*it)) return -12; + if (--mapNew[*it] == 0) + mapNew.erase(*it); + } + } + + if (setTried.size()) return -13; + if (mapNew.size()) return -15; + + return 0; +} +#endif + +void CAddrMan::GetAddr_(std::vector<CAddress> &vAddr) +{ + int nNodes = ADDRMAN_GETADDR_MAX_PCT*vRandom.size()/100; + if (nNodes > ADDRMAN_GETADDR_MAX) + nNodes = ADDRMAN_GETADDR_MAX; + + // perform a random shuffle over the first nNodes elements of vRandom (selecting from all) + for (int n = 0; n<nNodes; n++) + { + int nRndPos = GetRandInt(vRandom.size() - n) + n; + SwapRandom(n, nRndPos); + vAddr.push_back(mapInfo[vRandom[n]]); + } +} + +void CAddrMan::Connected_(const CService &addr, int64 nTime) +{ + CAddrInfo *pinfo = Find(addr); + + // if not found, bail out + if (!pinfo) + return; + + CAddrInfo &info = *pinfo; + + // check whether we are talking about the exact same CService (including same port) + if (info != addr) + return; + + // update info + int64 nUpdateInterval = 20 * 60; + if (nTime - info.nTime > nUpdateInterval) + info.nTime = nTime; +} diff --git a/src/addrman.h b/src/addrman.h new file mode 100644 index 0000000000..350ecb2709 --- /dev/null +++ b/src/addrman.h @@ -0,0 +1,499 @@ +// Copyright (c) 2012 Pieter Wuille +// Distributed under the MIT/X11 software license, see the accompanying +// file license.txt or http://www.opensource.org/licenses/mit-license.php. +#ifndef _BITCOIN_ADDRMAN +#define _BITCOIN_ADDRMAN 1 + +#include "netbase.h" +#include "protocol.h" +#include "util.h" + + +#include <map> +#include <vector> + +#include <openssl/rand.h> + + +// Extended statistics about a CAddress +class CAddrInfo : public CAddress +{ +private: + // where knowledge about this address first came from + CNetAddr source; + + // last succesfull connection by us + int64 nLastSuccess; + + // last try whatsoever by us: + // int64 CAddress::nLastTry + + // connection attempts since last succesful attempt + int nAttempts; + + // reference count in new sets (memory only) + int nRefCount; + + // in tried set? (memory only) + bool fInTried; + + // position in vRandom + int nRandomPos; + + friend class CAddrMan; + +public: + + IMPLEMENT_SERIALIZE( + CAddress* pthis = (CAddress*)(this); + READWRITE(*pthis); + READWRITE(source); + READWRITE(nLastSuccess); + READWRITE(nAttempts); + ) + + void Init() + { + nLastSuccess = 0; + nLastTry = 0; + nAttempts = 0; + nRefCount = 0; + fInTried = false; + nRandomPos = -1; + } + + CAddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn) + { + Init(); + } + + CAddrInfo() : CAddress(), source() + { + Init(); + } + + // Calculate in which "tried" bucket this entry belongs + int GetTriedBucket(const std::vector<unsigned char> &nKey) const; + + // Calculate in which "new" bucket this entry belongs, given a certain source + int GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAddr& src) const; + + // Calculate in which "new" bucket this entry belongs, using its default source + int GetNewBucket(const std::vector<unsigned char> &nKey) const + { + return GetNewBucket(nKey, source); + } + + // Determine whether the statistics about this entry are bad enough so that it can just be deleted + bool IsTerrible(int64 nNow = GetAdjustedTime()) const; + + // Calculate the relative chance this entry should be given when selecting nodes to connect to + double GetChance(int64 nNow = GetAdjustedTime()) const; + +}; + +// Stochastic address manager +// +// Design goals: +// * Only keep a limited number of addresses around, so that addr.dat and memory requirements do not grow without bound. +// * Keep the address tables in-memory, and asynchronously dump the entire to able in addr.dat. +// * Make sure no (localized) attacker can fill the entire table with his nodes/addresses. +// +// To that end: +// * Addresses are organized into buckets. +// * Address that have not yet been tried go into 256 "new" buckets. +// * Based on the address range (/16 for IPv4) of source of the information, 32 buckets are selected at random +// * The actual bucket is chosen from one of these, based on the range the address itself is located. +// * One single address can occur in up to 4 different buckets, to increase selection chances for addresses that +// are seen frequently. The chance for increasing this multiplicity decreases exponentially. +// * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen +// ones) is removed from it first. +// * Addresses of nodes that are known to be accessible go into 64 "tried" buckets. +// * Each address range selects at random 4 of these buckets. +// * The actual bucket is chosen from one of these, based on the full address. +// * When adding a new good address to a full bucket, a randomly chosen entry (with a bias favoring less recently +// tried ones) is evicted from it, back to the "new" buckets. +// * Bucket selection is based on cryptographic hashing, using a randomly-generated 256-bit key, which should not +// be observable by adversaries. +// * Several indexes are kept for high performance. Defining DEBUG_ADDRMAN will introduce frequent (and expensive) +// consistency checks for the entire datastructure. + +// total number of buckets for tried addresses +#define ADDRMAN_TRIED_BUCKET_COUNT 64 + +// maximum allowed number of entries in buckets for tried addresses +#define ADDRMAN_TRIED_BUCKET_SIZE 64 + +// total number of buckets for new addresses +#define ADDRMAN_NEW_BUCKET_COUNT 256 + +// maximum allowed number of entries in buckets for new addresses +#define ADDRMAN_NEW_BUCKET_SIZE 64 + +// over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread +#define ADDRMAN_TRIED_BUCKETS_PER_GROUP 4 + +// over how many buckets entries with new addresses originating from a single group are spread +#define ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP 32 + +// in how many buckets for entries with new addresses a single address may occur +#define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 4 + +// how many entries in a bucket with tried addresses are inspected, when selecting one to replace +#define ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT 4 + +// how old addresses can maximally be +#define ADDRMAN_HORIZON_DAYS 30 + +// after how many failed attempts we give up on a new node +#define ADDRMAN_RETRIES 3 + +// how many successive failures are allowed ... +#define ADDRMAN_MAX_FAILURES 10 + +// ... in at least this many days +#define ADDRMAN_MIN_FAIL_DAYS 7 + +// the maximum percentage of nodes to return in a getaddr call +#define ADDRMAN_GETADDR_MAX_PCT 23 + +// the maximum number of nodes to return in a getaddr call +#define ADDRMAN_GETADDR_MAX 2500 + +class CAddrMan +{ +private: + // critical section to protect the inner data structures + mutable CCriticalSection cs; + + // secret key to randomize bucket select with + std::vector<unsigned char> nKey; + + // last used nId + int nIdCount; + + // table with information about all nId's + std::map<int, CAddrInfo> mapInfo; + + // find an nId based on its network address + std::map<CNetAddr, int> mapAddr; + + // randomly-ordered vector of all nId's + std::vector<int> vRandom; + + // number of "tried" entries + int nTried; + + // list of "tried" buckets + std::vector<std::vector<int> > vvTried; + + // number of (unique) "new" entries + int nNew; + + // list of "new" buckets + std::vector<std::set<int> > vvNew; + +protected: + + // Find an entry. + CAddrInfo* Find(const CNetAddr& addr, int *pnId = NULL); + + // find an entry, creating it if necessary. + // nTime and nServices of found node is updated, if necessary. + CAddrInfo* Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId = NULL); + + // Swap two elements in vRandom. + void SwapRandom(int nRandomPos1, int nRandomPos2); + + // Return position in given bucket to replace. + int SelectTried(int nKBucket); + + // Remove an element from a "new" bucket. + // This is the only place where actual deletes occur. + // They are never deleted while in the "tried" table, only possibly evicted back to the "new" table. + int ShrinkNew(int nUBucket); + + // Move an entry from the "new" table(s) to the "tried" table + // @pre vvUnkown[nOrigin].count(nId) != 0 + void MakeTried(CAddrInfo& info, int nId, int nOrigin); + + // Mark an entry "good", possibly moving it from "new" to "tried". + void Good_(const CService &addr, int64 nTime); + + // Add an entry to the "new" table. + bool Add_(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty); + + // Mark an entry as attempted to connect. + void Attempt_(const CService &addr, int64 nTime); + + // Select an address to connect to. + // nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100) + CAddress Select_(int nUnkBias); + +#ifdef DEBUG_ADDRMAN + // Perform consistency check. Returns an error code or zero. + int Check_(); +#endif + + // Select several addresses at once. + void GetAddr_(std::vector<CAddress> &vAddr); + + // Mark an entry as currently-connected-to. + void Connected_(const CService &addr, int64 nTime); + +public: + + IMPLEMENT_SERIALIZE + (({ + // serialized format: + // * version byte (currently 0) + // * nKey + // * nNew + // * nTried + // * number of "new" buckets + // * all nNew addrinfo's in vvNew + // * all nTried addrinfo's in vvTried + // * for each bucket: + // * number of elements + // * for each element: index + // + // Notice that vvTried, mapAddr and vVector are never encoded explicitly; + // they are instead reconstructed from the other information. + // + // vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change, + // otherwise it is reconstructed as well. + // + // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports + // changes to the ADDRMAN_ parameters without breaking the on-disk structure. + CRITICAL_BLOCK(cs) + { + unsigned char nVersion = 0; + READWRITE(nVersion); + READWRITE(nKey); + READWRITE(nNew); + READWRITE(nTried); + + CAddrMan *am = const_cast<CAddrMan*>(this); + if (fWrite) + { + int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT; + READWRITE(nUBuckets); + std::map<int, int> mapUnkIds; + int nIds = 0; + for (std::map<int, CAddrInfo>::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++) + { + if (nIds == nNew) break; // this means nNew was wrong, oh ow + mapUnkIds[(*it).first] = nIds; + CAddrInfo &info = (*it).second; + if (info.nRefCount) + { + READWRITE(info); + nIds++; + } + } + nIds = 0; + for (std::map<int, CAddrInfo>::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++) + { + if (nIds == nTried) break; // this means nTried was wrong, oh ow + CAddrInfo &info = (*it).second; + if (info.fInTried) + { + READWRITE(info); + nIds++; + } + } + for (std::vector<std::set<int> >::iterator it = am->vvNew.begin(); it != am->vvNew.end(); it++) + { + const std::set<int> &vNew = (*it); + int nSize = vNew.size(); + READWRITE(nSize); + for (std::set<int>::iterator it2 = vNew.begin(); it2 != vNew.end(); it2++) + { + int nIndex = mapUnkIds[*it2]; + READWRITE(nIndex); + } + } + } else { + int nUBuckets = 0; + READWRITE(nUBuckets); + am->nIdCount = 0; + am->mapInfo.clear(); + am->mapAddr.clear(); + am->vRandom.clear(); + am->vvTried = std::vector<std::vector<int> >(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)); + am->vvNew = std::vector<std::set<int> >(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>()); + for (int n = 0; n < am->nNew; n++) + { + CAddrInfo &info = am->mapInfo[n]; + READWRITE(info); + am->mapAddr[info] = n; + info.nRandomPos = vRandom.size(); + am->vRandom.push_back(n); + if (nUBuckets != ADDRMAN_NEW_BUCKET_COUNT) + { + am->vvNew[info.GetNewBucket(am->nKey)].insert(n); + info.nRefCount++; + } + } + am->nIdCount = am->nNew; + int nLost = 0; + for (int n = 0; n < am->nTried; n++) + { + CAddrInfo info; + READWRITE(info); + std::vector<int> &vTried = am->vvTried[info.GetTriedBucket(am->nKey)]; + if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) + { + info.nRandomPos = vRandom.size(); + info.fInTried = true; + am->vRandom.push_back(am->nIdCount); + am->mapInfo[am->nIdCount] = info; + am->mapAddr[info] = am->nIdCount; + vTried.push_back(am->nIdCount); + am->nIdCount++; + } else { + nLost++; + } + } + am->nTried -= nLost; + for (int b = 0; b < nUBuckets; b++) + { + std::set<int> &vNew = am->vvNew[b]; + int nSize = 0; + READWRITE(nSize); + for (int n = 0; n < nSize; n++) + { + int nIndex = 0; + READWRITE(nIndex); + CAddrInfo &info = am->mapInfo[nIndex]; + if (nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS) + { + info.nRefCount++; + vNew.insert(nIndex); + } + } + } + } + } + });) + + CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>()) + { + nKey.resize(32); + RAND_bytes(&nKey[0], 32); + + nIdCount = 0; + nTried = 0; + nNew = 0; + } + + // Return the number of (unique) addresses in all tables. + int size() + { + return vRandom.size(); + } + + // Consistency check + void Check() + { +#ifdef DEBUG_ADDRMAN + CRITICAL_BLOCK(cs) + { + int err; + if ((err=Check_())) + printf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err); + } +#endif + } + + // Add a single address. + bool Add(const CAddress &addr, const CNetAddr& source, int64 nTimePenalty = 0) + { + bool fRet = false; + CRITICAL_BLOCK(cs) + { + Check(); + fRet |= Add_(addr, source, nTimePenalty); + Check(); + } + if (fRet) + printf("Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort().c_str(), source.ToString().c_str(), nTried, nNew); + return fRet; + } + + // Add multiple addresses. + bool Add(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64 nTimePenalty = 0) + { + int nAdd = 0; + CRITICAL_BLOCK(cs) + { + Check(); + for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++) + nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0; + Check(); + } + if (nAdd) + printf("Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString().c_str(), nTried, nNew); + return nAdd > 0; + } + + // Mark an entry as accessible. + void Good(const CService &addr, int64 nTime = GetAdjustedTime()) + { + CRITICAL_BLOCK(cs) + { + Check(); + Good_(addr, nTime); + Check(); + } + } + + // Mark an entry as connection attempted to. + void Attempt(const CService &addr, int64 nTime = GetAdjustedTime()) + { + CRITICAL_BLOCK(cs) + { + Check(); + Attempt_(addr, nTime); + Check(); + } + } + + // Choose an address to connect to. + // nUnkBias determines how much "new" entries are favored over "tried" ones (0-100). + CAddress Select(int nUnkBias = 50) + { + CAddress addrRet; + CRITICAL_BLOCK(cs) + { + Check(); + addrRet = Select_(nUnkBias); + Check(); + } + return addrRet; + } + + // Return a bunch of addresses, selected at random. + std::vector<CAddress> GetAddr() + { + Check(); + std::vector<CAddress> vAddr; + CRITICAL_BLOCK(cs) + GetAddr_(vAddr); + Check(); + return vAddr; + } + + // Mark an entry as currently-connected-to. + void Connected(const CService &addr, int64 nTime = GetAdjustedTime()) + { + CRITICAL_BLOCK(cs) + { + Check(); + Connected_(addr, nTime); + Check(); + } + } +}; + +#endif diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 5571c344a3..874d19f69c 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -54,24 +54,6 @@ Object JSONRPCError(int code, const string& message) return error; } - -void PrintConsole(const std::string &format, ...) -{ - char buffer[50000]; - int limit = sizeof(buffer); - va_list arg_ptr; - va_start(arg_ptr, format); - int ret = _vsnprintf(buffer, limit, format.c_str(), arg_ptr); - va_end(arg_ptr); - if (ret < 0 || ret >= limit) - { - ret = limit - 1; - buffer[limit-1] = 0; - } - printf("%s", buffer); - fprintf(stdout, "%s", buffer); -} - double GetDifficulty(const CBlockIndex* blockindex = NULL) { // Floating point number that is a multiple of the minimum difficulty, @@ -2388,8 +2370,8 @@ void ThreadRPCServer2(void* parg) strWhatAmI = strprintf(_("To use the %s option"), "\"-server\""); else if (mapArgs.count("-daemon")) strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\""); - PrintConsole( - _("Error: %s, you must set a rpcpassword in the configuration file:\n %s\n" + ::error( + _("%s, you must set a rpcpassword in the configuration file:\n %s\n" "It is recommended you use the following random password:\n" "rpcuser=bitcoinrpc\n" "rpcpassword=%s\n" diff --git a/src/db.cpp b/src/db.cpp index b77a038b41..56c59cbea7 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -84,8 +84,11 @@ CDB::CDB(const char* pszFile, const char* pszMode) : pdb(NULL) string strErrorFile = strDataDir + "/db.log"; printf("dbenv.open strLogDir=%s strErrorFile=%s\n", strLogDir.c_str(), strErrorFile.c_str()); + int nDbCache = GetArg("-dbcache", 25); dbenv.set_lg_dir(strLogDir.c_str()); - dbenv.set_lg_max(10000000); + dbenv.set_cachesize(nDbCache / 1024, (nDbCache % 1024)*1048576, 1); + dbenv.set_lg_bsize(10485760); + dbenv.set_lg_max(104857600); dbenv.set_lk_max_locks(10000); dbenv.set_lk_max_objects(10000); dbenv.set_errfile(fopen(strErrorFile.c_str(), "a")); /// debug @@ -156,7 +159,7 @@ void CDB::Close() nMinutes = 1; if (strFile == "addr.dat") nMinutes = 2; - if (strFile == "blkindex.dat" && IsInitialBlockDownload() && nBestHeight % 500 != 0) + if (strFile == "blkindex.dat" && IsInitialBlockDownload() && nBestHeight % 5000 != 0) nMinutes = 1; dbenv.txn_checkpoint(0, nMinutes, 0); @@ -580,19 +583,114 @@ bool CTxDB::LoadBlockIndex() ReadBestInvalidWork(bnBestInvalidWork); // Verify blocks in the best chain + int nCheckLevel = GetArg("-checklevel", 1); + int nCheckDepth = GetArg( "-checkblocks", 2500); + if (nCheckDepth == 0) + nCheckDepth = 1000000000; // suffices until the year 19000 + if (nCheckDepth > nBestHeight) + nCheckDepth = nBestHeight; + printf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); CBlockIndex* pindexFork = NULL; + map<pair<unsigned int, unsigned int>, CBlockIndex*> mapBlockPos; for (CBlockIndex* pindex = pindexBest; pindex && pindex->pprev; pindex = pindex->pprev) { - if (pindex->nHeight < nBestHeight-2500 && !mapArgs.count("-checkblocks")) + if (pindex->nHeight < nBestHeight-nCheckDepth) break; CBlock block; if (!block.ReadFromDisk(pindex)) return error("LoadBlockIndex() : block.ReadFromDisk failed"); - if (!block.CheckBlock()) + // check level 1: verify block validity + if (nCheckLevel>0 && !block.CheckBlock()) { printf("LoadBlockIndex() : *** found bad block at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str()); pindexFork = pindex->pprev; } + // check level 2: verify transaction index validity + if (nCheckLevel>1) + { + pair<unsigned int, unsigned int> pos = make_pair(pindex->nFile, pindex->nBlockPos); + mapBlockPos[pos] = pindex; + BOOST_FOREACH(const CTransaction &tx, block.vtx) + { + uint256 hashTx = tx.GetHash(); + CTxIndex txindex; + if (ReadTxIndex(hashTx, txindex)) + { + // check level 3: checker transaction hashes + if (nCheckLevel>2 || pindex->nFile != txindex.pos.nFile || pindex->nBlockPos != txindex.pos.nBlockPos) + { + // either an error or a duplicate transaction + CTransaction txFound; + if (!txFound.ReadFromDisk(txindex.pos)) + { + printf("LoadBlockIndex() : *** cannot read mislocated transaction %s\n", hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + else + if (txFound.GetHash() != hashTx) // not a duplicate tx + { + printf("LoadBlockIndex(): *** invalid tx position for %s\n", hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + } + // check level 4: check whether spent txouts were spent within the main chain + int nOutput = 0; + if (nCheckLevel>3) + BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent) + { + if (!txpos.IsNull()) + { + pair<unsigned int, unsigned int> posFind = make_pair(txpos.nFile, txpos.nBlockPos); + if (!mapBlockPos.count(posFind)) + { + printf("LoadBlockIndex(): *** found bad spend at %d, hashBlock=%s, hashTx=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString().c_str(), hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + // check level 6: check whether spent txouts were spent by a valid transaction that consume them + if (nCheckLevel>5) + { + CTransaction txSpend; + if (!txSpend.ReadFromDisk(txpos)) + { + printf("LoadBlockIndex(): *** cannot read spending transaction of %s:%i from disk\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + else if (!txSpend.CheckTransaction()) + { + printf("LoadBlockIndex(): *** spending transaction of %s:%i is invalid\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + else + { + bool fFound = false; + BOOST_FOREACH(const CTxIn &txin, txSpend.vin) + if (txin.prevout.hash == hashTx && txin.prevout.n == nOutput) + fFound = true; + if (!fFound) + { + printf("LoadBlockIndex(): *** spending transaction of %s:%i does not spend it\n", hashTx.ToString().c_str(), nOutput); + pindexFork = pindex->pprev; + } + } + } + } + nOutput++; + } + } + // check level 5: check whether all prevouts are marked spent + if (nCheckLevel>4) + BOOST_FOREACH(const CTxIn &txin, tx.vin) + { + CTxIndex txindex; + if (ReadTxIndex(txin.prevout.hash, txindex)) + if (txindex.vSpent.size()-1 < txin.prevout.n || txindex.vSpent[txin.prevout.n].IsNull()) + { + printf("LoadBlockIndex(): *** found unspent prevout %s:%i in %s\n", txin.prevout.hash.ToString().c_str(), txin.prevout.n, hashTx.ToString().c_str()); + pindexFork = pindex->pprev; + } + } + } + } } if (pindexFork) { @@ -621,44 +719,65 @@ bool CAddrDB::WriteAddress(const CAddress& addr) return Write(make_pair(string("addr"), addr.GetKey()), addr); } +bool CAddrDB::WriteAddrman(const CAddrMan& addrman) +{ + return Write(string("addrman"), addrman); +} + bool CAddrDB::EraseAddress(const CAddress& addr) { return Erase(make_pair(string("addr"), addr.GetKey())); } -bool CAddrDB::LoadAddresses() +bool CAddrDB::LoadAddresses(bool &fUpdate) { - CRITICAL_BLOCK(cs_mapAddresses) + bool fAddrMan = false; + if (Read(string("addrman"), addrman)) { - // Get cursor - Dbc* pcursor = GetCursor(); - if (!pcursor) + printf("Loaded %i addresses\n", addrman.size()); + fAddrMan = true; + } + + vector<CAddress> vAddr; + + // Get cursor + Dbc* pcursor = GetCursor(); + if (!pcursor) + return false; + + loop + { + // Read next record + CDataStream ssKey; + CDataStream ssValue; + int ret = ReadAtCursor(pcursor, ssKey, ssValue); + if (ret == DB_NOTFOUND) + break; + else if (ret != 0) return false; - loop + // Unserialize + string strType; + ssKey >> strType; + if (strType == "addr") { - // Read next record - CDataStream ssKey; - CDataStream ssValue; - int ret = ReadAtCursor(pcursor, ssKey, ssValue); - if (ret == DB_NOTFOUND) - break; - else if (ret != 0) - return false; - - // Unserialize - string strType; - ssKey >> strType; - if (strType == "addr") + if (fAddrMan) + fUpdate = true; + else { CAddress addr; ssValue >> addr; - mapAddresses.insert(make_pair(addr.GetKey(), addr)); + vAddr.push_back(addr); } + } - pcursor->close(); + } + pcursor->close(); - printf("Loaded %d addresses\n", mapAddresses.size()); + if (!fAddrMan) + { + addrman.Add(vAddr, CNetAddr("0.0.0.0")); + printf("Loaded %i addresses\n", addrman.size()); } return true; @@ -666,7 +785,11 @@ bool CAddrDB::LoadAddresses() bool LoadAddresses() { - return CAddrDB("cr+").LoadAddresses(); + bool fUpdate = false; + bool fRet = CAddrDB("cr+").LoadAddresses(fUpdate); + if (fUpdate) + CDB::Rewrite("addr.dat", "\004addr"); + return fRet; } @@ -771,10 +894,21 @@ int CWalletDB::LoadWallet(CWallet* pwallet) //// todo: shouldn't we catch exceptions and try to recover and continue? CRITICAL_BLOCK(pwallet->cs_wallet) { + int nMinVersion = 0; + if (Read((string)"minversion", nMinVersion)) + { + if (nMinVersion > CLIENT_VERSION) + return DB_TOO_NEW; + pwallet->LoadMinVersion(nMinVersion); + } + // Get cursor Dbc* pcursor = GetCursor(); if (!pcursor) + { + printf("Error getting wallet database cursor\n"); return DB_CORRUPT; + } loop { @@ -785,7 +919,10 @@ int CWalletDB::LoadWallet(CWallet* pwallet) if (ret == DB_NOTFOUND) break; else if (ret != 0) + { + printf("Error reading next record from wallet database\n"); return DB_CORRUPT; + } // Unserialize // Taking advantage of the fact that pair serialization @@ -856,8 +993,16 @@ int CWalletDB::LoadWallet(CWallet* pwallet) ssValue >> pkey; key.SetPubKey(vchPubKey); key.SetPrivKey(pkey); - if (key.GetPubKey() != vchPubKey || !key.IsValid()) + if (key.GetPubKey() != vchPubKey) + { + printf("Error reading wallet database: CPrivKey pubkey inconsistency\n"); + return DB_CORRUPT; + } + if (!key.IsValid()) + { + printf("Error reading wallet database: invalid CPrivKey\n"); return DB_CORRUPT; + } } else { @@ -865,11 +1010,22 @@ int CWalletDB::LoadWallet(CWallet* pwallet) ssValue >> wkey; key.SetPubKey(vchPubKey); key.SetPrivKey(wkey.vchPrivKey); - if (key.GetPubKey() != vchPubKey || !key.IsValid()) + if (key.GetPubKey() != vchPubKey) + { + printf("Error reading wallet database: CWalletKey pubkey inconsistency\n"); return DB_CORRUPT; + } + if (!key.IsValid()) + { + printf("Error reading wallet database: invalid CWalletKey\n"); + return DB_CORRUPT; + } } if (!pwallet->LoadKey(key)) + { + printf("Error reading wallet database: LoadKey failed\n"); return DB_CORRUPT; + } } else if (strType == "mkey") { @@ -878,7 +1034,10 @@ int CWalletDB::LoadWallet(CWallet* pwallet) CMasterKey kMasterKey; ssValue >> kMasterKey; if(pwallet->mapMasterKeys.count(nID) != 0) + { + printf("Error reading wallet database: duplicate CMasterKey id %u\n", nID); return DB_CORRUPT; + } pwallet->mapMasterKeys[nID] = kMasterKey; if (pwallet->nMasterKeyMaxID < nID) pwallet->nMasterKeyMaxID = nID; @@ -890,7 +1049,10 @@ int CWalletDB::LoadWallet(CWallet* pwallet) vector<unsigned char> vchPrivKey; ssValue >> vchPrivKey; if (!pwallet->LoadCryptedKey(vchPubKey, vchPrivKey)) + { + printf("Error reading wallet database: LoadCryptedKey failed\n"); return DB_CORRUPT; + } fIsEncrypted = true; } else if (strType == "defaultkey") @@ -909,14 +1071,6 @@ int CWalletDB::LoadWallet(CWallet* pwallet) if (nFileVersion == 10300) nFileVersion = 300; } - else if (strType == "minversion") - { - int nMinVersion = 0; - ssValue >> nMinVersion; - if (nMinVersion > CLIENT_VERSION) - return DB_TOO_NEW; - pwallet->LoadMinVersion(nMinVersion); - } else if (strType == "cscript") { uint160 hash; @@ -924,7 +1078,10 @@ int CWalletDB::LoadWallet(CWallet* pwallet) CScript script; ssValue >> script; if (!pwallet->LoadCScript(script)) + { + printf("Error reading wallet database: LoadCScript failed\n"); return DB_CORRUPT; + } } } pcursor->close(); @@ -16,6 +16,7 @@ class CAccount; class CAccountingEntry; class CAddress; +class CAddrMan; class CBlockLocator; class CDiskBlockIndex; class CDiskTxPos; @@ -307,7 +308,8 @@ private: public: bool WriteAddress(const CAddress& addr); bool EraseAddress(const CAddress& addr); - bool LoadAddresses(); + bool WriteAddrman(const CAddrMan& addr); + bool LoadAddresses(bool &fUpdate); }; bool LoadAddresses(); diff --git a/src/init.cpp b/src/init.cpp index 8fe0f90b19..603022e1e0 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -177,6 +177,7 @@ bool AppInit2(int argc, char* argv[]) " -min \t\t " + _("Start minimized") + "\n" + " -splash \t\t " + _("Show splash screen on startup (default: 1)") + "\n" + " -datadir=<dir> \t\t " + _("Specify data directory") + "\n" + + " -dbcache=<n> \t\t " + _("Set database cache size in megabytes (default: 25)") + "\n" + " -timeout=<n> \t " + _("Specify connection timeout (in milliseconds)") + "\n" + " -proxy=<ip:port> \t " + _("Connect through socks4 proxy") + "\n" + " -dns \t " + _("Allow DNS lookups for addnode and connect") + "\n" + @@ -222,7 +223,9 @@ bool AppInit2(int argc, char* argv[]) " -rpcconnect=<ip> \t " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n" + " -blocknotify=<cmd> " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n" + " -keypool=<n> \t " + _("Set key pool size to <n> (default: 100)") + "\n" + - " -rescan \t " + _("Rescan the block chain for missing wallet transactions") + "\n"; + " -rescan \t " + _("Rescan the block chain for missing wallet transactions") + "\n" + + " -checkblocks=<n> \t\t " + _("How many blocks to check at startup (default: 2500, 0 = all)") + "\n" + + " -checklevel=<n> \t\t " + _("How thorough the block verification is (0-6, default: 1)") + "\n"; #ifdef USE_SSL strUsage += string() + @@ -370,12 +373,14 @@ bool AppInit2(int argc, char* argv[]) else if (nLoadWalletRet == DB_NEED_REWRITE) { strErrors << _("Wallet needed to be rewritten: restart Bitcoin to complete") << "\n"; + printf("%s", strErrors.str().c_str()); wxMessageBox(strErrors.str(), "Bitcoin", wxOK | wxICON_ERROR); return false; } else strErrors << _("Error loading wallet.dat") << "\n"; } + printf("%s", strErrors.str().c_str()); printf(" wallet %15"PRI64d"ms\n", GetTimeMillis() - nStart); RegisterWallet(pwalletMain); @@ -487,24 +492,11 @@ bool AppInit2(int argc, char* argv[]) fAllowDNS = GetBoolArg("-dns"); fNoListen = !GetBoolArg("-listen", true); - // This code can be removed once a super-majority of the network has upgraded. - if (GetBoolArg("-bip16", true)) - { - if (fTestNet) - SoftSetArg("-paytoscripthashtime", "1329264000"); // Feb 15 - else - SoftSetArg("-paytoscripthashtime", "1333238400"); // April 1 2012 - - // Put "/P2SH/" in the coinbase so everybody can tell when - // a majority of miners support it - const char* pszP2SH = "/P2SH/"; - COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH)); - } - else - { - const char* pszP2SH = "NOP2SH"; - COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH)); - } + // Continue to put "/P2SH/" in the coinbase to monitor + // BIP16 support. + // This can be removed eventually... + const char* pszP2SH = "/P2SH/"; + COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH)); if (!fNoListen) { @@ -523,7 +515,7 @@ bool AppInit2(int argc, char* argv[]) CAddress addr(CService(strAddr, GetDefaultPort(), fAllowDNS)); addr.nTime = 0; // so it won't relay unless successfully connected if (addr.IsValid()) - AddAddress(addr); + addrman.Add(addr, CNetAddr("127.0.0.1")); } } diff --git a/src/irc.cpp b/src/irc.cpp index 7a6f40cfad..09bacc1658 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -341,7 +341,7 @@ void ThreadIRCSeed2(void* parg) if (DecodeAddress(pszName, addr)) { addr.nTime = GetAdjustedTime(); - if (AddAddress(addr, 51 * 60)) + if (addrman.Add(addr, addrConnect, 51 * 60)) printf("IRC got new address: %s\n", addr.ToString().c_str()); nGotIRCAddresses++; } diff --git a/src/main.cpp b/src/main.cpp index 1b56cead3c..d795ca1df9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1278,12 +1278,9 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex) return false; } - // To avoid being on the short end of a block-chain split, - // don't do secondary validation of pay-to-script-hash transactions - // until blocks with timestamps after paytoscripthashtime (see init.cpp for default). - // This code can be removed once a super-majority of the network has upgraded. - int64 nEvalSwitchTime = GetArg("-paytoscripthashtime", std::numeric_limits<int64_t>::max()); - bool fStrictPayToScriptHash = (pindex->nTime >= nEvalSwitchTime); + // BIP16 didn't become active until Apr 1 2012 (Feb 15 on testnet) + int64 nBIP16SwitchTime = fTestNet ? 1329264000 : 1333238400; + bool fStrictPayToScriptHash = (pindex->nTime >= nBIP16SwitchTime); //// issue here: it doesn't know the version unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK) - 1 + GetSizeOfCompactSize(vtx.size()); @@ -1382,6 +1379,9 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) vConnect.push_back(pindex); reverse(vConnect.begin(), vConnect.end()); + printf("REORGANIZE: Disconnect %i blocks; %s..%s\n", vDisconnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexBest->GetBlockHash().ToString().substr(0,20).c_str()); + printf("REORGANIZE: Connect %i blocks; %s..%s\n", vConnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->GetBlockHash().ToString().substr(0,20).c_str()); + // Disconnect shorter branch vector<CTransaction> vResurrect; BOOST_FOREACH(CBlockIndex* pindex, vDisconnect) @@ -1390,7 +1390,7 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) if (!block.ReadFromDisk(pindex)) return error("Reorganize() : ReadFromDisk for disconnect failed"); if (!block.DisconnectBlock(txdb, pindex)) - return error("Reorganize() : DisconnectBlock failed"); + return error("Reorganize() : DisconnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); // Queue memory transactions to resurrect BOOST_FOREACH(const CTransaction& tx, block.vtx) @@ -1410,7 +1410,7 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) { // Invalid block txdb.TxnAbort(); - return error("Reorganize() : ConnectBlock failed"); + return error("Reorganize() : ConnectBlock %s failed", pindex->GetBlockHash().ToString().substr(0,20).c_str()); } // Queue memory transactions to delete @@ -1442,8 +1442,7 @@ bool static Reorganize(CTxDB& txdb, CBlockIndex* pindexNew) BOOST_FOREACH(CTransaction& tx, vDelete) tx.RemoveFromMemoryPool(); - printf("REORGANIZE: Disconnected %i blocks; %s..%s\n", vDisconnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexBest->GetBlockHash().ToString().substr(0,20).c_str()); - printf("REORGANIZE: Connected %i blocks; %s..%s\n", vConnect.size(), pfork->GetBlockHash().ToString().substr(0,20).c_str(), pindexNew->GetBlockHash().ToString().substr(0,20).c_str()); + printf("REORGANIZE: done\n"); return true; } @@ -1457,10 +1456,9 @@ runCommand(std::string strCommand) printf("runCommand error: system(%s) returned %d\n", strCommand.c_str(), nErr); } +// Called from inside SetBestChain: attaches a block to the new best chain being built bool CBlock::SetBestChainInner(CTxDB& txdb, CBlockIndex *pindexNew) { - assert(pindexNew->pprev == pindexBest); - uint256 hash = GetHash(); // Adding to current best branch @@ -1707,10 +1705,11 @@ bool CBlock::AcceptBlock() return error("AcceptBlock() : AddToBlockIndex failed"); // Relay inventory, but don't relay old inventory during initial block download + int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(); if (hashBestChain == hash) CRITICAL_BLOCK(cs_vNodes) BOOST_FOREACH(CNode* pnode, vNodes) - if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 140700)) + if (nBestHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) pnode->PushInventory(CInv(MSG_BLOCK, hash)); return true; @@ -2236,11 +2235,18 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } // Get recent addresses - if (pfrom->nVersion >= 31402 || mapAddresses.size() < 1000) + if (pfrom->nVersion >= 31402 || addrman.size() < 1000) { pfrom->PushMessage("getaddr"); pfrom->fGetAddr = true; } + addrman.Good(pfrom->addr); + } else { + if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) + { + addrman.Add(addrFrom, addrFrom); + addrman.Good(addrFrom); + } } // Ask the first connected node for block updates @@ -2286,7 +2292,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) vRecv >> vAddr; // Don't want addr from older versions unless seeding - if (pfrom->nVersion < 31402 && mapAddresses.size() > 1000) + if (pfrom->nVersion < 31402 && addrman.size() > 1000) return true; if (vAddr.size() > 1000) { @@ -2295,8 +2301,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } // Store the new addresses - CAddrDB addrDB; - addrDB.TxnBegin(); int64 nNow = GetAdjustedTime(); int64 nSince = nNow - 10 * 60; BOOST_FOREACH(CAddress& addr, vAddr) @@ -2308,7 +2312,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) continue; if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) addr.nTime = nNow - 5 * 24 * 60 * 60; - AddAddress(addr, 2 * 60 * 60, &addrDB); pfrom->AddAddressKnown(addr); if (addr.nTime > nSince && !pfrom->fGetAddr && vAddr.size() <= 10 && addr.IsRoutable()) { @@ -2340,7 +2343,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } } } - addrDB.TxnCommit(); // Save addresses (it's ok if this fails) + addrman.Add(vAddr, pfrom->addr, 2 * 60 * 60); if (vAddr.size() < 1000) pfrom->fGetAddr = false; } @@ -2357,8 +2360,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } CTxDB txdb("r"); - BOOST_FOREACH(const CInv& inv, vInv) + for (int nInv = 0; nInv < vInv.size(); nInv++) { + const CInv &inv = vInv[nInv]; + if (fShutdown) return true; pfrom->AddInventoryKnown(inv); @@ -2367,9 +2372,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (fDebug) printf(" got inventory: %s %s\n", inv.ToString().c_str(), fAlreadyHave ? "have" : "new"); - if (!fAlreadyHave) + // Always request the last block in an inv bundle (even if we already have it), as it is the + // trigger for the other side to send further invs. If we are stuck on a (very long) side chain, + // this is necessary to connect earlier received orphan blocks to the chain again. + if (!fAlreadyHave || (inv.type == MSG_BLOCK && nInv==vInv.size()-1)) pfrom->AskFor(inv); - else if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) + if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(mapOrphanBlocks[inv.hash])); // Track requests for our stuff @@ -2586,25 +2594,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) else if (strCommand == "getaddr") { - // Nodes rebroadcast an addr every 24 hours pfrom->vAddrToSend.clear(); - int64 nSince = GetAdjustedTime() - 3 * 60 * 60; // in the last 3 hours - CRITICAL_BLOCK(cs_mapAddresses) - { - unsigned int nCount = 0; - BOOST_FOREACH(const PAIRTYPE(vector<unsigned char>, CAddress)& item, mapAddresses) - { - const CAddress& addr = item.second; - if (addr.nTime > nSince) - nCount++; - } - BOOST_FOREACH(const PAIRTYPE(vector<unsigned char>, CAddress)& item, mapAddresses) - { - const CAddress& addr = item.second; - if (addr.nTime > nSince && GetRand(nCount) < 2500) - pfrom->PushAddress(addr); - } - } + vector<CAddress> vAddr = addrman.GetAddr(); + BOOST_FOREACH(const CAddress &addr, vAddr) + pfrom->PushAddress(addr); } @@ -2846,35 +2839,6 @@ bool SendMessages(CNode* pto, bool fSendTrickle) nLastRebroadcast = GetTime(); } - // Clear out old addresses periodically so it's not too much work at once - static int64 nLastClear; - if (nLastClear == 0) - nLastClear = GetTime(); - if (GetTime() - nLastClear > 10 * 60 && vNodes.size() >= 3) - { - nLastClear = GetTime(); - CRITICAL_BLOCK(cs_mapAddresses) - { - CAddrDB addrdb; - int64 nSince = GetAdjustedTime() - 14 * 24 * 60 * 60; - for (map<vector<unsigned char>, CAddress>::iterator mi = mapAddresses.begin(); - mi != mapAddresses.end();) - { - const CAddress& addr = (*mi).second; - if (addr.nTime < nSince) - { - if (mapAddresses.size() < 1000 || GetTime() > nLastClear + 20) - break; - addrdb.EraseAddress(addr); - mapAddresses.erase(mi++); - } - else - mi++; - } - } - } - - // // Message: addr // diff --git a/src/makefile.linux-mingw b/src/makefile.linux-mingw index 9212698018..40ce1dcdca 100644 --- a/src/makefile.linux-mingw +++ b/src/makefile.linux-mingw @@ -45,6 +45,7 @@ HEADERS = $(wildcard *.h) OBJS= \ obj/checkpoints.o \ obj/netbase.o \ + obj/addrman.o \ obj/crypter.o \ obj/key.o \ obj/db.o \ diff --git a/src/makefile.mingw b/src/makefile.mingw index c55e17a36e..f7dfcc74c1 100644 --- a/src/makefile.mingw +++ b/src/makefile.mingw @@ -43,6 +43,7 @@ HEADERS = $(wildcard *.h) OBJS= \ obj/checkpoints.o \ obj/netbase.o \ + obj/addrman.o \ obj/crypter.o \ obj/key.o \ obj/db.o \ diff --git a/src/makefile.osx b/src/makefile.osx index 9943271a29..8790d92ce4 100644 --- a/src/makefile.osx +++ b/src/makefile.osx @@ -60,6 +60,7 @@ CFLAGS=-mmacosx-version-min=10.5 -arch i386 -O3 \ OBJS= \ obj/checkpoints.o \ obj/netbase.o \ + obj/addrman.o \ obj/crypter.o \ obj/key.o \ obj/db.o \ diff --git a/src/makefile.unix b/src/makefile.unix index 80b5bca341..92c1b97e1f 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -85,12 +85,13 @@ LIBS+= \ DEBUGFLAGS=-g CXXFLAGS=-O2 -xCXXFLAGS=-pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat-security \ +xCXXFLAGS=-pthread -Wextra -Wno-sign-compare -Wno-char-subscripts -Wno-invalid-offsetof -Wformat -Wformat-security \ $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS) OBJS= \ obj/checkpoints.o \ obj/netbase.o \ + obj/addrman.o \ obj/crypter.o \ obj/key.o \ obj/db.o \ diff --git a/src/net.cpp b/src/net.cpp index b22300e82f..e9ec233a13 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -9,6 +9,7 @@ #include "net.h" #include "init.h" #include "strlcpy.h" +#include "addrman.h" #ifdef WIN32 #include <string.h> @@ -50,11 +51,10 @@ static CNode* pnodeLocalHost = NULL; uint64 nLocalHostNonce = 0; array<int, THREAD_MAX> vnThreadsRunning; static SOCKET hListenSocket = INVALID_SOCKET; +CAddrMan addrman; vector<CNode*> vNodes; CCriticalSection cs_vNodes; -map<vector<unsigned char>, CAddress> mapAddresses; -CCriticalSection cs_mapAddresses; map<CInv, CDataStream> mapRelay; deque<pair<int64, CInv> > vRelayExpiration; CCriticalSection cs_mapRelay; @@ -280,86 +280,9 @@ void ThreadGetMyExternalIP(void* parg) -bool AddAddress(CAddress addr, int64 nTimePenalty, CAddrDB *pAddrDB) -{ - if (!addr.IsRoutable()) - return false; - if ((CService)addr == (CService)addrLocalHost) - return false; - addr.nTime = max((int64)0, (int64)addr.nTime - nTimePenalty); - bool fUpdated = false; - bool fNew = false; - CAddress addrFound = addr; - - CRITICAL_BLOCK(cs_mapAddresses) - { - map<vector<unsigned char>, CAddress>::iterator it = mapAddresses.find(addr.GetKey()); - if (it == mapAddresses.end()) - { - // New address - printf("AddAddress(%s)\n", addr.ToString().c_str()); - mapAddresses.insert(make_pair(addr.GetKey(), addr)); - fUpdated = true; - fNew = true; - } - else - { - addrFound = (*it).second; - if ((addrFound.nServices | addr.nServices) != addrFound.nServices) - { - // Services have been added - addrFound.nServices |= addr.nServices; - fUpdated = true; - } - bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60); - int64 nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60); - if (addrFound.nTime < addr.nTime - nUpdateInterval) - { - // Periodically update most recently seen time - addrFound.nTime = addr.nTime; - fUpdated = true; - } - } - } - // There is a nasty deadlock bug if this is done inside the cs_mapAddresses - // CRITICAL_BLOCK: - // Thread 1: begin db transaction (locks inside-db-mutex) - // then AddAddress (locks cs_mapAddresses) - // Thread 2: AddAddress (locks cs_mapAddresses) - // ... then db operation hangs waiting for inside-db-mutex - if (fUpdated) - { - if (pAddrDB) - pAddrDB->WriteAddress(addrFound); - else - CAddrDB().WriteAddress(addrFound); - } - return fNew; -} - void AddressCurrentlyConnected(const CService& addr) { - CAddress *paddrFound = NULL; - - CRITICAL_BLOCK(cs_mapAddresses) - { - // Only if it's been published already - map<vector<unsigned char>, CAddress>::iterator it = mapAddresses.find(addr.GetKey()); - if (it != mapAddresses.end()) - paddrFound = &(*it).second; - } - - if (paddrFound) - { - int64 nUpdateInterval = 20 * 60; - if (paddrFound->nTime < GetAdjustedTime() - nUpdateInterval) - { - // Periodically update most recently seen time - paddrFound->nTime = GetAdjustedTime(); - CAddrDB addrdb; - addrdb.WriteAddress(*paddrFound); - } - } + addrman.Connected(addr); } @@ -506,13 +429,11 @@ CNode* ConnectNode(CAddress addrConnect, int64 nTimeout) } /// debug print - printf("trying connection %s lastseen=%.1fhrs lasttry=%.1fhrs\n", + printf("trying connection %s lastseen=%.1fhrs\n", addrConnect.ToString().c_str(), - (double)(addrConnect.nTime - GetAdjustedTime())/3600.0, - (double)(addrConnect.nLastTry - GetAdjustedTime())/3600.0); + (double)(addrConnect.nTime - GetAdjustedTime())/3600.0); - CRITICAL_BLOCK(cs_mapAddresses) - mapAddresses[addrConnect.GetKey()].nLastTry = GetAdjustedTime(); + addrman.Attempt(addrConnect); // Connect SOCKET hSocket; @@ -559,6 +480,7 @@ void CNode::CloseSocketDisconnect() printf("disconnecting node %s\n", addr.ToString().c_str()); closesocket(hSocket); hSocket = INVALID_SOCKET; + vRecv.clear(); } } @@ -1125,12 +1047,15 @@ void MapPort(bool /* unused fMapPort */) - -static const char *strDNSSeed[] = { - "bitseed.xf2.org", - "dnsseed.bluematt.me", - "seed.bitcoin.sipa.be", - "dnsseed.bitcoin.dashjr.org", +// DNS seeds +// Each pair gives a source name and a seed name. +// The first name is used as information source for addrman. +// The second name should resolve to a list of seed addresses. +static const char *strDNSSeed[][2] = { + {"xf2.org", "bitseed.xf2.org"}, + {"bluematt.me", "dnsseed.bluematt.me"}, + {"bitcoin.sipa.be", "seed.bitcoin.sipa.be"}, + {"dashjr.org", "dnsseed.bitcoin.dashjr.org"}, }; void ThreadDNSAddressSeed(void* parg) @@ -1163,22 +1088,18 @@ void ThreadDNSAddressSeed2(void* parg) for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) { vector<CNetAddr> vaddr; - if (LookupHost(strDNSSeed[seed_idx], vaddr)) + vector<CAddress> vAdd; + if (LookupHost(strDNSSeed[seed_idx][1], vaddr)) { - CAddrDB addrDB; - addrDB.TxnBegin(); - BOOST_FOREACH (CNetAddr& ip, vaddr) + BOOST_FOREACH(CNetAddr& ip, vaddr) { - if (ip.IsRoutable()) - { - CAddress addr(CService(ip, GetDefaultPort()), NODE_NETWORK); - addr.nTime = 0; - AddAddress(addr, 0, &addrDB); - found++; - } + CAddress addr = CAddress(CService(ip, GetDefaultPort())); + addr.nTime = 0; + vAdd.push_back(addr); + found++; } - addrDB.TxnCommit(); // Save addresses (it's ok if this fails) } + addrman.Add(vAdd, CNetAddr(strDNSSeed[seed_idx][0], true)); } } @@ -1277,7 +1198,37 @@ unsigned int pnSeed[] = 0xc461d84a, 0xb2dbe247, }; +void DumpAddresses() +{ + CAddrDB adb; + adb.WriteAddrman(addrman); +} +void ThreadDumpAddress2(void* parg) +{ + vnThreadsRunning[THREAD_DUMPADDRESS]++; + while (!fShutdown) + { + DumpAddresses(); + vnThreadsRunning[THREAD_DUMPADDRESS]--; + Sleep(100000); + vnThreadsRunning[THREAD_DUMPADDRESS]++; + } + vnThreadsRunning[THREAD_DUMPADDRESS]--; +} + +void ThreadDumpAddress(void* parg) +{ + IMPLEMENT_RANDOMIZE_STACK(ThreadDumpAddress(parg)); + try + { + ThreadDumpAddress2(parg); + } + catch (std::exception& e) { + PrintException(&e, "ThreadDumpAddress()"); + } + printf("ThreadDumpAddress exiting\n"); +} void ThreadOpenConnections(void* parg) { @@ -1326,6 +1277,8 @@ void ThreadOpenConnections2(void* parg) int64 nStart = GetTime(); loop { + int nOutbound = 0; + vnThreadsRunning[THREAD_OPENCONNECTIONS]--; Sleep(500); vnThreadsRunning[THREAD_OPENCONNECTIONS]++; @@ -1335,7 +1288,7 @@ void ThreadOpenConnections2(void* parg) // Limit outbound connections loop { - int nOutbound = 0; + nOutbound = 0; CRITICAL_BLOCK(cs_vNodes) BOOST_FOREACH(CNode* pnode, vNodes) if (!pnode->fInbound) @@ -1353,16 +1306,11 @@ void ThreadOpenConnections2(void* parg) bool fAddSeeds = false; - CRITICAL_BLOCK(cs_mapAddresses) - { - // Add seed nodes if IRC isn't working - bool fTOR = (fUseProxy && addrProxy.GetPort() == 9050); - if (mapAddresses.empty() && (GetTime() - nStart > 60 || fTOR) && !fTestNet) - fAddSeeds = true; - } - - if (fAddSeeds) + // Add seed nodes if IRC isn't working + bool fTOR = (fUseProxy && addrProxy.GetPort() == 9050); + if (addrman.size()==0 && (GetTime() - nStart > 60 || fTOR) && !fTestNet) { + std::vector<CAddress> vAdd; for (int i = 0; i < ARRAYLEN(pnSeed); i++) { // It'll only connect to one or two seed nodes because once it connects, @@ -1374,8 +1322,9 @@ void ThreadOpenConnections2(void* parg) memcpy(&ip, &pnSeed[i], sizeof(ip)); CAddress addr(CService(ip, GetDefaultPort())); addr.nTime = GetTime()-GetRand(nOneWeek)-nOneWeek; - AddAddress(addr); + vAdd.push_back(addr); } + addrman.Add(vAdd, CNetAddr("127.0.0.1")); } // @@ -1393,59 +1342,28 @@ void ThreadOpenConnections2(void* parg) int64 nANow = GetAdjustedTime(); - CRITICAL_BLOCK(cs_mapAddresses) + int nTries = 0; + loop { - BOOST_FOREACH(const PAIRTYPE(vector<unsigned char>, CAddress)& item, mapAddresses) - { - const CAddress& addr = item.second; - if (!addr.IsIPv4() || !addr.IsValid() || setConnected.count(addr.GetGroup())) - continue; - int64 nSinceLastSeen = nANow - addr.nTime; - int64 nSinceLastTry = nANow - addr.nLastTry; - - // Randomize the order in a deterministic way, putting the standard port first - int64 nRandomizer = (uint64)(nStart * 4951 + addr.nLastTry * 9567851 + addr.GetHash()) % (2 * 60 * 60); - if (addr.GetPort() != GetDefaultPort()) - nRandomizer += 2 * 60 * 60; - - // Last seen Base retry frequency - // <1 hour 10 min - // 1 hour 1 hour - // 4 hours 2 hours - // 24 hours 5 hours - // 48 hours 7 hours - // 7 days 13 hours - // 30 days 27 hours - // 90 days 46 hours - // 365 days 93 hours - int64 nDelay = (int64)(3600.0 * sqrt(fabs((double)nSinceLastSeen) / 3600.0) + nRandomizer); - - // Fast reconnect for one hour after last seen - if (nSinceLastSeen < 60 * 60) - nDelay = 10 * 60; - - // Limit retry frequency - if (nSinceLastTry < nDelay) - continue; + // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections) + CAddress addr = addrman.Select(10 + min(nOutbound,8)*10); - // If we have IRC, we'll be notified when they first come online, - // and again every 24 hours by the refresh broadcast. - if (nGotIRCAddresses > 0 && vNodes.size() >= 2 && nSinceLastSeen > 24 * 60 * 60) - continue; + // if we selected an invalid address, restart + if (!addr.IsIPv4() || !addr.IsValid() || setConnected.count(addr.GetGroup()) || addr == addrLocalHost) + break; - // Only try the old stuff if we don't have enough connections - if (vNodes.size() >= 8 && nSinceLastSeen > 24 * 60 * 60) - continue; + nTries++; - // If multiple addresses are ready, prioritize by time since - // last seen and time since last tried. - int64 nScore = min(nSinceLastTry, (int64)24 * 60 * 60) - nSinceLastSeen - nRandomizer; - if (nScore > nBest) - { - nBest = nScore; - addrConnect = addr; - } - } + // only consider very recently tried nodes after 30 failed attempts + if (nANow - addr.nLastTry < 600 && nTries < 30) + continue; + + // do not allow non-default ports, unless after 50 invalid addresses selected already + if (addr.GetPort() != GetDefaultPort() && nTries < 50) + continue; + + addrConnect = addr; + break; } if (addrConnect.IsValid()) @@ -1819,6 +1737,10 @@ void StartNode(void* parg) if (!CreateThread(ThreadMessageHandler, NULL)) printf("Error: CreateThread(ThreadMessageHandler) failed\n"); + // Dump network addresses + if (!CreateThread(ThreadDumpAddress, NULL)) + printf("Error; CreateThread(ThreadDumpAddress) failed\n"); + // Generate coins in the background GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain); } @@ -1848,10 +1770,11 @@ bool StopNode() if (fHaveUPnP && vnThreadsRunning[THREAD_UPNP] > 0) printf("ThreadMapPort still running\n"); if (vnThreadsRunning[THREAD_DNSSEED] > 0) printf("ThreadDNSAddressSeed still running\n"); if (vnThreadsRunning[THREAD_ADDEDCONNECTIONS] > 0) printf("ThreadOpenAddedConnections still running\n"); + if (vnThreadsRunning[THREAD_DUMPADDRESS] > 0) printf("ThreadDumpAddresses still running\n"); while (vnThreadsRunning[THREAD_MESSAGEHANDLER] > 0 || vnThreadsRunning[THREAD_RPCSERVER] > 0) Sleep(20); Sleep(50); - + DumpAddresses(); return true; } @@ -17,6 +17,7 @@ #include "mruset.h" #include "netbase.h" #include "protocol.h" +#include "addrman.h" class CAddrDB; class CRequestTracker; @@ -32,7 +33,6 @@ static const unsigned int PUBLISH_HOPS = 5; bool RecvLine(SOCKET hSocket, std::string& strLine); bool GetMyExternalIP(CNetAddr& ipRet); -bool AddAddress(CAddress addr, int64 nTimePenalty=0, CAddrDB *pAddrDB=NULL); void AddressCurrentlyConnected(const CService& addr); CNode* FindNode(const CNetAddr& ip); CNode* FindNode(const CService& ip); @@ -80,6 +80,7 @@ enum threadId THREAD_UPNP, THREAD_DNSSEED, THREAD_ADDEDCONNECTIONS, + THREAD_DUMPADDRESS, THREAD_MAX }; @@ -90,11 +91,10 @@ extern uint64 nLocalServices; extern CAddress addrLocalHost; extern uint64 nLocalHostNonce; extern boost::array<int, THREAD_MAX> vnThreadsRunning; +extern CAddrMan addrman; extern std::vector<CNode*> vNodes; extern CCriticalSection cs_vNodes; -extern std::map<std::vector<unsigned char>, CAddress> mapAddresses; -extern CCriticalSection cs_mapAddresses; extern std::map<CInv, CDataStream> mapRelay; extern std::deque<std::pair<int64, CInv> > vRelayExpiration; extern CCriticalSection cs_mapRelay; diff --git a/src/netbase.cpp b/src/netbase.cpp index 7799a65972..baf7c412a0 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -519,15 +519,22 @@ bool CNetAddr::GetIn6Addr(struct in6_addr* pipv6Addr) const std::vector<unsigned char> CNetAddr::GetGroup() const { std::vector<unsigned char> vchRet; - int nClass = 0; // 0=IPv6, 1=IPv4, 255=unroutable + int nClass = 0; // 0=IPv6, 1=IPv4, 254=local, 255=unroutable int nStartByte = 0; int nBits = 16; - // for unroutable addresses, each address is considered different + // all local addresses belong to the same group + if (IsLocal()) + { + nClass = 254; + nBits = 0; + } + + // all unroutable addresses belong to the same group if (!IsRoutable()) { nClass = 255; - nBits = 128; + nBits = 0; } // for IPv4 addresses, '1' + the 16 higher-order bits of the IP // includes mapped IPv4, SIIT translated IPv4, and the well-known prefix diff --git a/src/protocol.h b/src/protocol.h index b70dd71b82..613c47f042 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -94,7 +94,7 @@ class CAddress : public CService unsigned int nTime; // memory only - unsigned int nLastTry; + int64 nLastTry; }; class CInv diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 5e79f6ec98..27d57b35e1 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -1,5 +1,5 @@ /* - * W.J. van der Laan 20011-2012 + * W.J. van der Laan 2011-2012 */ #include "bitcoingui.h" #include "clientmodel.h" diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc index 5b7ccee84a..d0247c236d 100644 --- a/src/qt/bitcoin.qrc +++ b/src/qt/bitcoin.qrc @@ -49,7 +49,6 @@ </qresource> <qresource prefix="/translations"> <file alias="ca_ES">locale/bitcoin_ca_ES.qm</file> - <file alias="cs_CZ">locale/bitcoin_cs_CZ.qm</file> <file alias="cs">locale/bitcoin_cs.qm</file> <file alias="da">locale/bitcoin_da.qm</file> <file alias="de">locale/bitcoin_de.qm</file> diff --git a/src/qt/locale/bitcoin_cs_CZ.ts b/src/qt/locale/bitcoin_cs_CZ.ts deleted file mode 100644 index dd14868d74..0000000000 --- a/src/qt/locale/bitcoin_cs_CZ.ts +++ /dev/null @@ -1,1931 +0,0 @@ -<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs_CZ" version="2.0"> -<defaultcodec>UTF-8</defaultcodec> -<context> - <name>AboutDialog</name> - <message> - <location filename="../forms/aboutdialog.ui" line="14"/> - <source>About Bitcoin</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/aboutdialog.ui" line="53"/> - <source><b>Bitcoin</b> version</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/aboutdialog.ui" line="85"/> - <source>Copyright © 2009-2012 Bitcoin Developers - -This is experimental software. - -Distributed under the MIT/X11 software license, see the accompanying file license.txt or http://www.opensource.org/licenses/mit-license.php. - -This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>AddressBookPage</name> - <message> - <location filename="../forms/addressbookpage.ui" line="14"/> - <source>Address Book</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="20"/> - <source>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.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="33"/> - <source>Double-click to edit address or label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="57"/> - <source>Create a new address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="60"/> - <source>&New Address...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="71"/> - <source>Copy the currently selected address to the system clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="74"/> - <source>&Copy to Clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="85"/> - <source>Show &QR Code</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="96"/> - <source>Sign a message to prove you own this address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="99"/> - <source>&Sign Message</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="110"/> - <source>Delete the currently selected address from the list. Only sending addresses can be deleted.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/addressbookpage.ui" line="113"/> - <source>&Delete</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="62"/> - <source>Copy address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="63"/> - <source>Copy label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="64"/> - <source>Edit</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="65"/> - <source>Delete</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="282"/> - <source>Export Address Book Data</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="284"/> - <source>Comma separated file (*.csv)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="297"/> - <source>Error exporting</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addressbookpage.cpp" line="297"/> - <source>Could not write to file %1.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>AddressTableModel</name> - <message> - <location filename="../addresstablemodel.cpp" line="77"/> - <source>Label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addresstablemodel.cpp" line="77"/> - <source>Address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../addresstablemodel.cpp" line="113"/> - <source>(no label)</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>AskPassphraseDialog</name> - <message> - <location filename="../forms/askpassphrasedialog.ui" line="26"/> - <source>Dialog</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/askpassphrasedialog.ui" line="32"/> - <location filename="../forms/askpassphrasedialog.ui" line="97"/> - <source>TextLabel</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/askpassphrasedialog.ui" line="50"/> - <source>Enter passphrase</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/askpassphrasedialog.ui" line="64"/> - <source>New passphrase</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/askpassphrasedialog.ui" line="78"/> - <source>Repeat new passphrase</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="34"/> - <source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="35"/> - <source>Encrypt wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="38"/> - <source>This operation needs your wallet passphrase to unlock the wallet.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="43"/> - <source>Unlock wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="46"/> - <source>This operation needs your wallet passphrase to decrypt the wallet.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="51"/> - <source>Decrypt wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="54"/> - <source>Change passphrase</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="55"/> - <source>Enter the old and new passphrase to the wallet.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="101"/> - <source>Confirm wallet encryption</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="102"/> - <source>WARNING: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>! -Are you sure you wish to encrypt your wallet?</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="111"/> - <location filename="../askpassphrasedialog.cpp" line="160"/> - <source>Wallet encrypted</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="112"/> - <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="208"/> - <location filename="../askpassphrasedialog.cpp" line="232"/> - <source>Warning: The Caps Lock key is on.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="117"/> - <location filename="../askpassphrasedialog.cpp" line="124"/> - <location filename="../askpassphrasedialog.cpp" line="166"/> - <location filename="../askpassphrasedialog.cpp" line="172"/> - <source>Wallet encryption failed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="118"/> - <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="125"/> - <location filename="../askpassphrasedialog.cpp" line="173"/> - <source>The supplied passphrases do not match.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="136"/> - <source>Wallet unlock failed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="137"/> - <location filename="../askpassphrasedialog.cpp" line="148"/> - <location filename="../askpassphrasedialog.cpp" line="167"/> - <source>The passphrase entered for the wallet decryption was incorrect.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="147"/> - <source>Wallet decryption failed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../askpassphrasedialog.cpp" line="161"/> - <source>Wallet passphrase was succesfully changed.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>BitcoinGUI</name> - <message> - <location filename="../bitcoingui.cpp" line="66"/> - <source>Bitcoin Wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="139"/> - <location filename="../bitcoingui.cpp" line="455"/> - <source>Synchronizing with network...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="142"/> - <source>Block chain synchronization in progress</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="171"/> - <source>&Overview</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="172"/> - <source>Show general overview of wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="177"/> - <source>&Transactions</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="178"/> - <source>Browse transaction history</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="183"/> - <source>&Address Book</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="184"/> - <source>Edit the list of stored addresses and labels</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="189"/> - <source>&Receive coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="190"/> - <source>Show the list of addresses for receiving payments</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="195"/> - <source>&Send coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="196"/> - <source>Send coins to a bitcoin address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="201"/> - <source>Sign &message</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="202"/> - <source>Prove you control an address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="221"/> - <source>E&xit</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="222"/> - <source>Quit application</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="225"/> - <source>&About %1</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="226"/> - <source>Show information about Bitcoin</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="228"/> - <source>About &Qt</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="229"/> - <source>Show information about Qt</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="231"/> - <source>&Options...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="232"/> - <source>Modify configuration options for bitcoin</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="234"/> - <source>Open &Bitcoin</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="235"/> - <source>Show the Bitcoin window</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="236"/> - <source>&Export...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="237"/> - <source>Export the current view to a file</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="238"/> - <source>&Encrypt Wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="239"/> - <source>Encrypt or decrypt wallet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="241"/> - <source>&Change Passphrase</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="242"/> - <source>Change the passphrase used for wallet encryption</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="264"/> - <source>&File</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="271"/> - <source>&Settings</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="277"/> - <source>&Help</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="284"/> - <source>Tabs toolbar</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="295"/> - <source>Actions toolbar</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="307"/> - <source>[testnet]</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="397"/> - <source>bitcoin-qt</source> - <translation type="unfinished"/> - </message> - <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="440"/> - <source>%n active connection(s) to Bitcoin network</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="466"/> - <source>Downloaded %1 of %2 blocks of transaction history.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="478"/> - <source>Downloaded %1 blocks of transaction history.</source> - <translation type="unfinished"/> - </message> - <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="489"/> - <source>%n second(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="493"/> - <source>%n minute(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="497"/> - <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="501"/> - <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message> - <location filename="../bitcoingui.cpp" line="507"/> - <source>Up to date</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="512"/> - <source>Catching up...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="518"/> - <source>Last received block was generated %1.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="585"/> - <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="590"/> - <source>Sending...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="617"/> - <source>Sent transaction</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="618"/> - <source>Incoming transaction</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="619"/> - <source>Date: %1 -Amount: %2 -Type: %3 -Address: %4 -</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="740"/> - <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoingui.cpp" line="748"/> - <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>DisplayOptionsPage</name> - <message> - <location filename="../optionsdialog.cpp" line="270"/> - <source>&Unit to show amounts in: </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="274"/> - <source>Choose the default subdivision unit to show in the interface, and when sending coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="281"/> - <source>Display addresses in transaction list</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>EditAddressDialog</name> - <message> - <location filename="../forms/editaddressdialog.ui" line="14"/> - <source>Edit Address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/editaddressdialog.ui" line="25"/> - <source>&Label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/editaddressdialog.ui" line="35"/> - <source>The label associated with this address book entry</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/editaddressdialog.ui" line="42"/> - <source>&Address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/editaddressdialog.ui" line="52"/> - <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="20"/> - <source>New receiving address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="24"/> - <source>New sending address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="27"/> - <source>Edit receiving address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="31"/> - <source>Edit sending address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="91"/> - <source>The entered address "%1" is already in the address book.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="96"/> - <source>The entered address "%1" is not a valid bitcoin address.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="101"/> - <source>Could not unlock wallet.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../editaddressdialog.cpp" line="106"/> - <source>New key generation failed.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>MainOptionsPage</name> - <message> - <location filename="../optionsdialog.cpp" line="170"/> - <source>&Start Bitcoin on window system startup</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="171"/> - <source>Automatically start Bitcoin after the computer is turned on</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="175"/> - <source>&Minimize to the tray instead of the taskbar</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="176"/> - <source>Show only a tray icon after minimizing the window</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="180"/> - <source>Map port using &UPnP</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="181"/> - <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="185"/> - <source>M&inimize on close</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="186"/> - <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="190"/> - <source>&Connect through SOCKS4 proxy:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="191"/> - <source>Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="196"/> - <source>Proxy &IP: </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="202"/> - <source>IP address of the proxy (e.g. 127.0.0.1)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="205"/> - <source>&Port: </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="211"/> - <source>Port of the proxy (e.g. 1234)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="217"/> - <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="223"/> - <source>Pay transaction &fee</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="226"/> - <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>MessagePage</name> - <message> - <location filename="../forms/messagepage.ui" line="14"/> - <source>Message</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="20"/> - <source>You can sign messages with your addresses to prove you own them. Be careful to only sign statement you agree to with full details, as phishing attacks may try to trick you into signing access to them.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="38"/> - <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="48"/> - <source>Choose adress from address book</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="58"/> - <source>Alt+A</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="71"/> - <source>Paste address from clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="81"/> - <source>Alt+P</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="93"/> - <source>Enter the message you want to sign here</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="105"/> - <source>Click "Sign Message" to get signature</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="117"/> - <source>Sign a message to prove you own this address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="120"/> - <source>&Sign Message</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="131"/> - <source>Copy the currently selected address to the system clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/messagepage.ui" line="134"/> - <source>&Copy to Clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../messagepage.cpp" line="74"/> - <location filename="../messagepage.cpp" line="89"/> - <location filename="../messagepage.cpp" line="101"/> - <source>Error signing</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../messagepage.cpp" line="74"/> - <source>%1 is not a valid address.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../messagepage.cpp" line="89"/> - <source>Private key for %1 is not available.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../messagepage.cpp" line="101"/> - <source>Sign failed</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>OptionsDialog</name> - <message> - <location filename="../optionsdialog.cpp" line="79"/> - <source>Main</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="84"/> - <source>Display</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../optionsdialog.cpp" line="104"/> - <source>Options</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>OverviewPage</name> - <message> - <location filename="../forms/overviewpage.ui" line="14"/> - <source>Form</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="40"/> - <source>Balance:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="47"/> - <source>123.456 BTC</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="54"/> - <source>Number of transactions:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="61"/> - <source>0</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="68"/> - <source>Unconfirmed:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="75"/> - <source>0 BTC</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="82"/> - <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Wallet</span></p></body></html></source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/overviewpage.ui" line="122"/> - <source><b>Recent transactions</b></source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../overviewpage.cpp" line="103"/> - <source>Your current balance</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../overviewpage.cpp" line="108"/> - <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../overviewpage.cpp" line="111"/> - <source>Total number of transactions in wallet</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>QRCodeDialog</name> - <message> - <location filename="../forms/qrcodedialog.ui" line="14"/> - <source>Dialog</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="32"/> - <source>QR Code</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="52"/> - <source>Request Payment</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="67"/> - <source>Amount:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="102"/> - <source>BTC</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="118"/> - <source>Label:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="141"/> - <source>Message:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/qrcodedialog.ui" line="183"/> - <source>&Save As...</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>SendCoinsDialog</name> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="14"/> - <location filename="../sendcoinsdialog.cpp" line="122"/> - <location filename="../sendcoinsdialog.cpp" line="127"/> - <location filename="../sendcoinsdialog.cpp" line="132"/> - <location filename="../sendcoinsdialog.cpp" line="137"/> - <location filename="../sendcoinsdialog.cpp" line="143"/> - <location filename="../sendcoinsdialog.cpp" line="148"/> - <location filename="../sendcoinsdialog.cpp" line="153"/> - <source>Send Coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="64"/> - <source>Send to multiple recipients at once</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="67"/> - <source>&Add recipient...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="84"/> - <source>Remove all transaction fields</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="87"/> - <source>Clear all</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="106"/> - <source>Balance:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="113"/> - <source>123.456 BTC</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="144"/> - <source>Confirm the send action</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsdialog.ui" line="147"/> - <source>&Send</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="94"/> - <source><b>%1</b> to %2 (%3)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="99"/> - <source>Confirm send coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="100"/> - <source>Are you sure you want to send %1?</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="100"/> - <source> and </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="123"/> - <source>The recepient address is not valid, please recheck.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="128"/> - <source>The amount to pay must be larger than 0.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="133"/> - <source>Amount exceeds your balance</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="138"/> - <source>Total exceeds your balance when the %1 transaction fee is included</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="144"/> - <source>Duplicate address found, can only send to each address once in one send operation</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="149"/> - <source>Error: Transaction creation failed </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsdialog.cpp" line="154"/> - <source>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.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>SendCoinsEntry</name> - <message> - <location filename="../forms/sendcoinsentry.ui" line="14"/> - <source>Form</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="29"/> - <source>A&mount:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="42"/> - <source>Pay &To:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="66"/> - <location filename="../sendcoinsentry.cpp" line="26"/> - <source>Enter a label for this address to add it to your address book</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="75"/> - <source>&Label:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="93"/> - <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="103"/> - <source>Choose address from address book</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="113"/> - <source>Alt+A</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="120"/> - <source>Paste address from clipboard</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="130"/> - <source>Alt+P</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/sendcoinsentry.ui" line="137"/> - <source>Remove this recipient</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../sendcoinsentry.cpp" line="25"/> - <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>TransactionDesc</name> - <message> - <location filename="../transactiondesc.cpp" line="18"/> - <source>Open for %1 blocks</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="20"/> - <source>Open until %1</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="26"/> - <source>%1/offline?</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="28"/> - <source>%1/unconfirmed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="30"/> - <source>%1 confirmations</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="47"/> - <source><b>Status:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="52"/> - <source>, has not been successfully broadcast yet</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="54"/> - <source>, broadcast through %1 node</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="56"/> - <source>, broadcast through %1 nodes</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="60"/> - <source><b>Date:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="67"/> - <source><b>Source:</b> Generated<br></source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="73"/> - <location filename="../transactiondesc.cpp" line="90"/> - <source><b>From:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="90"/> - <source>unknown</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="91"/> - <location filename="../transactiondesc.cpp" line="114"/> - <location filename="../transactiondesc.cpp" line="173"/> - <source><b>To:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="94"/> - <source> (yours, label: </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="96"/> - <source> (yours)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="131"/> - <location filename="../transactiondesc.cpp" line="145"/> - <location filename="../transactiondesc.cpp" line="190"/> - <location filename="../transactiondesc.cpp" line="207"/> - <source><b>Credit:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="133"/> - <source>(%1 matures in %2 more blocks)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="137"/> - <source>(not accepted)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="181"/> - <location filename="../transactiondesc.cpp" line="189"/> - <location filename="../transactiondesc.cpp" line="204"/> - <source><b>Debit:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="195"/> - <source><b>Transaction fee:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="211"/> - <source><b>Net amount:</b> </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="217"/> - <source>Message:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="219"/> - <source>Comment:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="221"/> - <source>Transaction ID:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiondesc.cpp" line="224"/> - <source>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.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>TransactionDescDialog</name> - <message> - <location filename="../forms/transactiondescdialog.ui" line="14"/> - <source>Transaction details</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../forms/transactiondescdialog.ui" line="20"/> - <source>This pane shows a detailed description of the transaction</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>TransactionTableModel</name> - <message> - <location filename="../transactiontablemodel.cpp" line="213"/> - <source>Date</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="213"/> - <source>Type</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="213"/> - <source>Address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="213"/> - <source>Amount</source> - <translation type="unfinished"/> - </message> - <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="274"/> - <source>Open for %n block(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="277"/> - <source>Open until %1</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="280"/> - <source>Offline (%1 confirmations)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="283"/> - <source>Unconfirmed (%1 of %2 confirmations)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="286"/> - <source>Confirmed (%1 confirmations)</source> - <translation type="unfinished"/> - </message> - <message numerus="yes"> - <location filename="../transactiontablemodel.cpp" line="295"/> - <source>Mined balance will be available in %n more blocks</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="301"/> - <source>This block was not received by any other nodes and will probably not be accepted!</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="304"/> - <source>Generated but not accepted</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="347"/> - <source>Received with</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="349"/> - <source>Received from</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="352"/> - <source>Sent to</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="354"/> - <source>Payment to yourself</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="356"/> - <source>Mined</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="394"/> - <source>(n/a)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="593"/> - <source>Transaction status. Hover over this field to show number of confirmations.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="595"/> - <source>Date and time that the transaction was received.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="597"/> - <source>Type of transaction.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="599"/> - <source>Destination address of transaction.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactiontablemodel.cpp" line="601"/> - <source>Amount removed from or added to balance.</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>TransactionView</name> - <message> - <location filename="../transactionview.cpp" line="56"/> - <location filename="../transactionview.cpp" line="72"/> - <source>All</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="57"/> - <source>Today</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="58"/> - <source>This week</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="59"/> - <source>This month</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="60"/> - <source>Last month</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="61"/> - <source>This year</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="62"/> - <source>Range...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="73"/> - <source>Received with</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="75"/> - <source>Sent to</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="77"/> - <source>To yourself</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="78"/> - <source>Mined</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="79"/> - <source>Other</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="85"/> - <source>Enter address or label to search</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="91"/> - <source>Min amount</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="125"/> - <source>Copy address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="126"/> - <source>Copy label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="127"/> - <source>Copy amount</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="128"/> - <source>Edit label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="129"/> - <source>Show details...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="269"/> - <source>Export Transaction Data</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="271"/> - <source>Comma separated file (*.csv)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="279"/> - <source>Confirmed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="280"/> - <source>Date</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="281"/> - <source>Type</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="282"/> - <source>Label</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="283"/> - <source>Address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="284"/> - <source>Amount</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="285"/> - <source>ID</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="289"/> - <source>Error exporting</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="289"/> - <source>Could not write to file %1.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="384"/> - <source>Range:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../transactionview.cpp" line="392"/> - <source>to</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>WalletModel</name> - <message> - <location filename="../walletmodel.cpp" line="144"/> - <source>Sending...</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>bitcoin-core</name> - <message> - <location filename="../bitcoinstrings.cpp" line="3"/> - <source>Bitcoin version</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="4"/> - <source>Usage:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="5"/> - <source>Send command to -server or bitcoind</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="6"/> - <source>List commands</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="7"/> - <source>Get help for a command</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="8"/> - <source>Options:</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="9"/> - <source>Specify configuration file (default: bitcoin.conf)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="10"/> - <source>Specify pid file (default: bitcoind.pid)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="11"/> - <source>Generate coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="12"/> - <source>Don't generate coins</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="13"/> - <source>Start minimized</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="14"/> - <source>Specify data directory</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="15"/> - <source>Specify connection timeout (in milliseconds)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="16"/> - <source>Connect through socks4 proxy</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="17"/> - <source>Allow DNS lookups for addnode and connect</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="18"/> - <source>Listen for connections on <port> (default: 8333 or testnet: 18333)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="19"/> - <source>Maintain at most <n> connections to peers (default: 125)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="20"/> - <source>Add a node to connect to</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="21"/> - <source>Connect only to the specified node</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="22"/> - <source>Don't accept connections from outside</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="23"/> - <source>Don't bootstrap list of peers using DNS</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="24"/> - <source>Threshold for disconnecting misbehaving peers (default: 100)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="25"/> - <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="28"/> - <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="29"/> - <source>Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="30"/> - <source>Don't attempt to use UPnP to map the listening port</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="31"/> - <source>Attempt to use UPnP to map the listening port</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="32"/> - <source>Fee per kB to add to transactions you send</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="33"/> - <source>Accept command line and JSON-RPC commands</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="34"/> - <source>Run in the background as a daemon and accept commands</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="35"/> - <source>Use the test network</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="36"/> - <source>Output extra debugging information</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="37"/> - <source>Prepend debug output with timestamp</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="38"/> - <source>Send trace/debug info to console instead of debug.log file</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="39"/> - <source>Send trace/debug info to debugger</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="40"/> - <source>Username for JSON-RPC connections</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="41"/> - <source>Password for JSON-RPC connections</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="42"/> - <source>Listen for JSON-RPC connections on <port> (default: 8332)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="43"/> - <source>Allow JSON-RPC connections from specified IP address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="44"/> - <source>Send commands to node running on <ip> (default: 127.0.0.1)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="45"/> - <source>Set key pool size to <n> (default: 100)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="46"/> - <source>Rescan the block chain for missing wallet transactions</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="47"/> - <source> -SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="50"/> - <source>Use OpenSSL (https) for JSON-RPC connections</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="51"/> - <source>Server certificate file (default: server.cert)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="52"/> - <source>Server private key (default: server.pem)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="53"/> - <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="56"/> - <source>This help message</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="57"/> - <source>Cannot obtain a lock on data directory %s. Bitcoin is probably already running.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="60"/> - <source>Loading addresses...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="61"/> - <source>Error loading addr.dat</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="63"/> - <source>Error loading blkindex.dat</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="65"/> - <source>Error loading wallet.dat: Wallet corrupted</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="66"/> - <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="67"/> - <source>Wallet needed to be rewritten: restart Bitcoin to complete</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="68"/> - <source>Error loading wallet.dat</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="62"/> - <source>Loading block index...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="64"/> - <source>Loading wallet...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="69"/> - <source>Rescanning...</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="70"/> - <source>Done loading</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="71"/> - <source>Invalid -proxy address</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="72"/> - <source>Invalid amount for -paytxfee=<amount></source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="73"/> - <source>Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="76"/> - <source>Error: CreateThread(StartNode) failed</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="77"/> - <source>Warning: Disk space is low </source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="78"/> - <source>Unable to bind to port %d on this computer. Bitcoin is probably already running.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="81"/> - <source>Warning: Please check that your computer's date and time are correct. If your clock is wrong Bitcoin will not work properly.</source> - <translation type="unfinished"/> - </message> - <message> - <location filename="../bitcoinstrings.cpp" line="84"/> - <source>beta</source> - <translation type="unfinished"/> - </message> -</context> -<context> - <name>main</name> - <message> - <location filename="../bitcoin.cpp" line="188"/> - <source>Bitcoin-Qt</source> - <translation type="unfinished"/> - </message> -</context> -</TS>
\ No newline at end of file diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index bbd729a01c..aeeefd84d7 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -23,9 +23,9 @@ Distributed under the MIT/X11 software license, see the accompanying file licens This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation>Copyright © 2009-2012 Bitcoin Entwickler -Dies ist experimentelle Software. +Dies ist experimentelle Software. -Veröffentlicht unter der MIT/X11 Software-Lizenz, siehe beiligenden Datei license.txt oder http://www.opensource.org/licenses/mit-license.php. +Veröffentlicht unter der MIT/X11 Software-Lizenz, siehe beiligende Datei license.txt oder http://www.opensource.org/licenses/mit-license.php. Dieses Produkt enthält Software, die vom OpenSSL Projekt zur Verwendung im OpenSSL Toolkit (http://www.openssl.org/) entwickelt wurde, sowie kryptographische Software geschrieben von Eric Young (eay@cryptsoft.com) und UPnP Software geschrieben von Thomas Bernard.</translation> </message> @@ -40,12 +40,12 @@ Dieses Produkt enthält Software, die vom OpenSSL Projekt zur Verwendung im Open <message> <location filename="../forms/addressbookpage.ui" line="20"/> <source>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.</source> - <translation>Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine Andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten.</translation> + <translation>Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es steht Ihnen frei, jedem Absender eine andere mitzuteilen, um einen besseren Überblick über eingehende Zahlungen zu erhalten.</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="33"/> <source>Double-click to edit address or label</source> - <translation>Doppelklicken um die Adresse oder die Bezeichnung zu bearbeiten</translation> + <translation>Doppelklicken, um die Adresse oder die Bezeichnung zu bearbeiten</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="57"/> @@ -55,7 +55,7 @@ Dieses Produkt enthält Software, die vom OpenSSL Projekt zur Verwendung im Open <message> <location filename="../forms/addressbookpage.ui" line="60"/> <source>&New Address...</source> - <translation>&Neue Adresse...</translation> + <translation>&Neue Adresse</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="71"/> @@ -182,7 +182,7 @@ Dieses Produkt enthält Software, die vom OpenSSL Projekt zur Verwendung im Open <message> <location filename="../askpassphrasedialog.cpp" line="34"/> <source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source> - <translation>Geben Sie die neue Passphrase für die Brieftasche ein.<br/>Bitte benutzen Sie eine Passphrase bestehend aus <b>zehn oder mehr zufälligen Zeichen</b> oder <b>acht oder mehr Wörtern</b>.</translation> + <translation>Geben Sie die neue Passphrase für die Brieftasche ein. Bitte benutzen Sie eine Passphrase bestehend aus <b>10 oder mehr zufälligen Zeichen</b> oder <b>8 oder mehr Wörtern</b>.</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="35"/> @@ -240,7 +240,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../askpassphrasedialog.cpp" line="112"/> <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source> - <translation>Bitcoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadprogramme schützt, die Ihren Computer befallen haben.</translation> + <translation>Bitcoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Verschlüsselung Ihrer Brieftasche nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadsoftware schützt, die Ihren Computer befällt.</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="208"/> @@ -336,7 +336,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="184"/> <source>Edit the list of stored addresses and labels</source> - <translation>Liste der gespeicherten Adressen und Bezeichnungen bearbeiten</translation> + <translation>Liste der gespeicherten Zahlungsadressen und Bezeichnungen bearbeiten</translation> </message> <message> <location filename="../bitcoingui.cpp" line="189"/> @@ -361,7 +361,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="201"/> <source>Sign &message</source> - <translation>&Nachricht signieren</translation> + <translation>&Nachricht signieren...</translation> </message> <message> <location filename="../bitcoingui.cpp" line="202"/> @@ -401,7 +401,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="231"/> <source>&Options...</source> - <translation>&Erweiterte Einstellungen...</translation> + <translation>&Erweiterte Einstellungen</translation> </message> <message> <location filename="../bitcoingui.cpp" line="232"/> @@ -421,7 +421,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="236"/> <source>&Export...</source> - <translation>&Exportieren...</translation> + <translation>&Exportieren nach...</translation> </message> <message> <location filename="../bitcoingui.cpp" line="237"/> @@ -431,7 +431,7 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="238"/> <source>&Encrypt Wallet</source> - <translation>Brieftasche &verschlüsseln</translation> + <translation>Brieftasche &verschlüsseln...</translation> </message> <message> <location filename="../bitcoingui.cpp" line="239"/> @@ -536,12 +536,12 @@ Sind Sie sich sicher, dass Sie Ihre Brieftasche verschlüsseln möchten?</transl <message> <location filename="../bitcoingui.cpp" line="585"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> - <translation>Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das Bitcoin-Netzwerk. Möchten Sie die Gebühr bezahlen?</translation> + <translation>Die Transaktion übersteigt das Größenlimit. Sie können sie trotzdem senden, wenn Sie eine zusätzliche Transaktionsgebühr in Höhe von %1 zahlen. Diese wird an die Knoten verteilt, die Ihre Transaktion bearbeiten und unterstützt damit das Bitcoin-Netzwerk. Möchten Sie die Gebühr bezahlen?</translation> </message> <message> <location filename="../bitcoingui.cpp" line="590"/> <source>Sending...</source> - <translation>Überweisen...</translation> + <translation>Transaktionsgebühr bestätigen</translation> </message> <message> <location filename="../bitcoingui.cpp" line="617"/> @@ -568,12 +568,12 @@ Adresse: %4</translation> <message> <location filename="../bitcoingui.cpp" line="740"/> <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> - <translation>Brieftasche ist <b>verschlüsselt</b> und momentan <b>entsperrt</b></translation> + <translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>entsperrt</b></translation> </message> <message> <location filename="../bitcoingui.cpp" line="748"/> <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> - <translation>Brieftasche ist <b>verschlüsselt</b> und momentan <b>gesperrt</b></translation> + <translation>Brieftasche ist <b>verschlüsselt</b> und aktuell <b>gesperrt</b></translation> </message> </context> <context> @@ -737,7 +737,7 @@ Adresse: %4</translation> <message> <location filename="../optionsdialog.cpp" line="217"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> - <translation>Optionale Transaktionsgebühr pro kB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß. Eine Gebühr von 0.01 wird empfohlen.</translation> + <translation>Optionale Transaktionsgebühr pro kB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß. Eine Gebühr von 0.01 wird empfohlen.</translation> </message> <message> <location filename="../optionsdialog.cpp" line="223"/> @@ -755,7 +755,7 @@ Adresse: %4</translation> <message> <location filename="../forms/messagepage.ui" line="14"/> <source>Message</source> - <translation>Nachricht</translation> + <translation>Nachricht signieren</translation> </message> <message> <location filename="../forms/messagepage.ui" line="20"/> @@ -765,7 +765,7 @@ Adresse: %4</translation> <message> <location filename="../forms/messagepage.ui" line="38"/> <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source> - <translation>Die Zahlungsadresse der Überweisung (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> + <translation>Die Adresse mit der die Nachricht signiert wird (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation> </message> <message> <location filename="../forms/messagepage.ui" line="48"/> @@ -795,12 +795,12 @@ Adresse: %4</translation> <message> <location filename="../forms/messagepage.ui" line="105"/> <source>Click "Sign Message" to get signature</source> - <translation>Auf "Nachricht signieren" klicken, um die Signatur zu erhalten</translation> + <translation>Auf "Nachricht signieren" klicken, um die Signatur zu erhalten. Diese wird dann hier angezeigt.</translation> </message> <message> <location filename="../forms/messagepage.ui" line="117"/> <source>Sign a message to prove you own this address</source> - <translation>Eine Nachricht signieren, um den Besitz dieser Adresse nachzuweisen</translation> + <translation>Die Nachricht signieren, um den Besitz der angegebenen Adresse nachzuweisen</translation> </message> <message> <location filename="../forms/messagepage.ui" line="120"/> @@ -921,7 +921,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../overviewpage.cpp" line="108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> - <translation>Betrag aus Transaktionen, die noch bestätigt werden müssen und der noch nicht zum aktuellen Kontostand zählt</translation> + <translation>Betrag aus unbestätigten Transaktionen, der noch nicht im aktuellen Kontostand enthalten ist</translation> </message> <message> <location filename="../overviewpage.cpp" line="111"/> @@ -989,17 +989,17 @@ p, li { white-space: pre-wrap; } <message> <location filename="../forms/sendcoinsdialog.ui" line="64"/> <source>Send to multiple recipients at once</source> - <translation>An mehrere Empfänger auf einmal überweisen</translation> + <translation>In einer Transaktion an mehrere Empfänger auf einmal überweisen</translation> </message> <message> <location filename="../forms/sendcoinsdialog.ui" line="67"/> <source>&Add recipient...</source> - <translation>&Empfänger hinzufügen...</translation> + <translation>&Empfänger hinzufügen</translation> </message> <message> <location filename="../forms/sendcoinsdialog.ui" line="84"/> <source>Remove all transaction fields</source> - <translation>Alle Transaktionsfelder entfernen</translation> + <translation>Alle Überweisungsfelder zurücksetzen</translation> </message> <message> <location filename="../forms/sendcoinsdialog.ui" line="87"/> @@ -1039,7 +1039,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../sendcoinsdialog.cpp" line="100"/> <source>Are you sure you want to send %1?</source> - <translation>Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten? %1</translation> + <translation>Sind Sie sich sicher, dass Sie die folgende Überweisung ausführen möchten?<br>%1</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="100"/> @@ -1059,12 +1059,12 @@ p, li { white-space: pre-wrap; } <message> <location filename="../sendcoinsdialog.cpp" line="133"/> <source>Amount exceeds your balance</source> - <translation>Der Betrag übersteigt Ihren Kontostand</translation> + <translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="138"/> <source>Total exceeds your balance when the %1 transaction fee is included</source> - <translation>Der Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand</translation> + <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="144"/> @@ -1074,12 +1074,12 @@ p, li { white-space: pre-wrap; } <message> <location filename="../sendcoinsdialog.cpp" line="149"/> <source>Error: Transaction creation failed </source> - <translation>Fehler: Transaktionserstellung fehlgeschlagen </translation> + <translation>Fehler: Transaktionserstellung fehlgeschlagen</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="154"/> <source>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.</source> - <translation>Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige Bitcoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation> + <translation>Fehler: Die Transaktion wurde abgelehnt. Dies kann passieren, wenn einige Bitcoins aus Ihrer Brieftasche bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Brieftasche nicht vermerkt ist.</translation> </message> </context> <context> @@ -1103,7 +1103,7 @@ p, li { white-space: pre-wrap; } <location filename="../forms/sendcoinsentry.ui" line="66"/> <location filename="../sendcoinsentry.cpp" line="26"/> <source>Enter a label for this address to add it to your address book</source> - <translation>Geben Sie hier eine Bezeichnung der Adresse ein, um sie zum Adressbuch hinzuzufügen</translation> + <translation>Adressbezeichnung eingeben (diese wird bei unbekannten Adressen inkl. der Adresse dem Adressbuch hinzugefügt)</translation> </message> <message> <location filename="../forms/sendcoinsentry.ui" line="75"/> @@ -1181,17 +1181,17 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactiondesc.cpp" line="52"/> <source>, has not been successfully broadcast yet</source> - <translation>; wurde noch nicht erfolgreich gesendet</translation> + <translation>, wurde noch nicht erfolgreich übertragen</translation> </message> <message> <location filename="../transactiondesc.cpp" line="54"/> <source>, broadcast through %1 node</source> - <translation>; über %1 Knoten gesendet</translation> + <translation>, über %1 Knoten übertragen</translation> </message> <message> <location filename="../transactiondesc.cpp" line="56"/> <source>, broadcast through %1 nodes</source> - <translation>; über %1 Knoten gesendet</translation> + <translation>, über %1 Knoten übertragen</translation> </message> <message> <location filename="../transactiondesc.cpp" line="60"/> @@ -1224,12 +1224,12 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactiondesc.cpp" line="94"/> <source> (yours, label: </source> - <translation> (Ihre, Bezeichnung: </translation> + <translation> (Eigene Adresse, Bezeichnung: </translation> </message> <message> <location filename="../transactiondesc.cpp" line="96"/> <source> (yours)</source> - <translation> (Ihre)</translation> + <translation> (Eigene Adresse)</translation> </message> <message> <location filename="../transactiondesc.cpp" line="131"/> @@ -1242,7 +1242,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactiondesc.cpp" line="133"/> <source>(%1 matures in %2 more blocks)</source> - <translation>(%1 reift in weiteren %2 Blöcken)</translation> + <translation>%1 (reift noch %2 weitere Blöcke)</translation> </message> <message> <location filename="../transactiondesc.cpp" line="137"/> @@ -1284,7 +1284,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactiondesc.cpp" line="224"/> <source>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.</source> - <translation>Generierte Bitcoins müssen 120 Blöcke lang warten, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk gesendet, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in "nicht angenommen" geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block zur selben Zeit wie Sie generierte.</translation> + <translation>Generierte Bitcoins müssen 120 Blöcke lang warten, bevor sie ausgegeben werden können. Als Sie diesen Block generierten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in "nicht angenommen" geändert und der Betrag wird nicht verfügbar werden. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block zur selben Zeit wie Sie generierte.</translation> </message> </context> <context> @@ -1380,7 +1380,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactiontablemodel.cpp" line="354"/> <source>Payment to yourself</source> - <translation>Zahlung an Sie selbst</translation> + <translation>Eigenüberweisung</translation> </message> <message> <location filename="../transactiontablemodel.cpp" line="356"/> @@ -1454,7 +1454,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactionview.cpp" line="62"/> <source>Range...</source> - <translation>Zeitraum...</translation> + <translation>Zeitraum</translation> </message> <message> <location filename="../transactionview.cpp" line="73"/> @@ -1469,7 +1469,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactionview.cpp" line="77"/> <source>To yourself</source> - <translation>Zu Ihnen selbst</translation> + <translation>Eigenüberweisung</translation> </message> <message> <location filename="../transactionview.cpp" line="78"/> @@ -1489,7 +1489,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactionview.cpp" line="91"/> <source>Min amount</source> - <translation>Kleinster Betrag</translation> + <translation>Minimaler Betrag</translation> </message> <message> <location filename="../transactionview.cpp" line="125"/> @@ -1514,7 +1514,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../transactionview.cpp" line="129"/> <source>Show details...</source> - <translation>Details anzeigen...</translation> + <translation>Transaktionsdetails anzeigen</translation> </message> <message> <location filename="../transactionview.cpp" line="269"/> @@ -1610,8 +1610,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../bitcoinstrings.cpp" line="6"/> <source>List commands</source> - <translation>Befehle auflisten -</translation> + <translation>Befehle auflisten</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="7"/> @@ -1636,7 +1635,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../bitcoinstrings.cpp" line="11"/> <source>Generate coins</source> - <translation>Generiere Bitcoins</translation> + <translation>Bitcoins generieren</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="12"/> @@ -1711,22 +1710,22 @@ p, li { white-space: pre-wrap; } <message> <location filename="../bitcoinstrings.cpp" line="28"/> <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 10000)</source> - <translation>Maximale Grösse des Empfangspuffers pro Verbindung, <n>*1000 Bytes (Standard: 10000)</translation> + <translation>Maximale Größe des Empfangspuffers pro Verbindung, <n>*1000 Bytes (Standard: 10000)</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="29"/> <source>Maximum per-connection send buffer, <n>*1000 bytes (default: 10000)</source> - <translation>Maximale Grösse des Sendepuffers pro Verbindung, <n>*1000 Bytes (Standard: 10000)</translation> + <translation>Maximale Größe des Sendepuffers pro Verbindung, <n>*1000 Bytes (Standard: 10000)</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="30"/> <source>Don't attempt to use UPnP to map the listening port</source> - <translation>Nicht versuchen UPnP zu verwenden, um den abhörenden Port zu verbinden</translation> + <translation>Nicht versuchen UPnP zu verwenden, um den abgehörten Port weiterzuleiten</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="31"/> <source>Attempt to use UPnP to map the listening port</source> - <translation>Versuchen UPnP zu verwenden, um den abhörenden Port auszuhandeln</translation> + <translation>Versuchen UPnP zu verwenden, um den abgehörten Port weiterzuleiten</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="32"/> @@ -1736,7 +1735,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../bitcoinstrings.cpp" line="33"/> <source>Accept command line and JSON-RPC commands</source> - <translation>Erlaube Kommandozeile und JSON-RPC Befehle</translation> + <translation>Kommandozeilenbefehle und JSON-RPC Befehle annehmen</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="34"/> @@ -1761,7 +1760,7 @@ p, li { white-space: pre-wrap; } <message> <location filename="../bitcoinstrings.cpp" line="38"/> <source>Send trace/debug info to console instead of debug.log file</source> - <translation>Rückverfolgungs- und Debug-Informationen an die Konsole senden anstatt in die debug.log Datei</translation> + <translation>Rückverfolgungs- und Debug-Informationen an die Konsole senden anstatt sie in die debug.log Datei zu schreiben</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="39"/> @@ -1908,7 +1907,7 @@ SSL Einstellungen: (siehe Bitcoin-Wiki für SSL Installationsanweisungen)</trans <message> <location filename="../bitcoinstrings.cpp" line="73"/> <source>Warning: -paytxfee is set very high. This is the transaction fee you will pay if you send a transaction.</source> - <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert gesetzt. Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation> + <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert gesetzt. Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="76"/> @@ -1918,12 +1917,12 @@ SSL Einstellungen: (siehe Bitcoin-Wiki für SSL Installationsanweisungen)</trans <message> <location filename="../bitcoinstrings.cpp" line="77"/> <source>Warning: Disk space is low </source> - <translation>Warnung: Festplattenplatz wird knapp </translation> + <translation>Warnung: Festplattenplatz wird knapp</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="78"/> <source>Unable to bind to port %d on this computer. Bitcoin is probably already running.</source> - <translation>Fehler beim registrieren des Ports %d auf diesem Computer. Evtl. wurde Bitcoin bereits gestartet.</translation> + <translation>Fehler beim registrieren des Ports %d auf diesem Computer. Evtl. wurde Bitcoin bereits gestartet.</translation> </message> <message> <location filename="../bitcoinstrings.cpp" line="81"/> diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 5e89fe15f8..d83d4bc2d1 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -89,42 +89,42 @@ This product includes software developed by the OpenSSL Project for use in the O <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="62"/> + <location filename="../addressbookpage.cpp" line="61"/> <source>Copy address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="63"/> + <location filename="../addressbookpage.cpp" line="62"/> <source>Copy label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="64"/> + <location filename="../addressbookpage.cpp" line="63"/> <source>Edit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="65"/> + <location filename="../addressbookpage.cpp" line="64"/> <source>Delete</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="282"/> + <location filename="../addressbookpage.cpp" line="281"/> <source>Export Address Book Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="284"/> + <location filename="../addressbookpage.cpp" line="282"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="297"/> + <location filename="../addressbookpage.cpp" line="295"/> <source>Error exporting</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../addressbookpage.cpp" line="297"/> + <location filename="../addressbookpage.cpp" line="295"/> <source>Could not write to file %1.</source> <translation type="unfinished"></translation> </message> @@ -288,198 +288,208 @@ Are you sure you wish to encrypt your wallet?</source> <context> <name>BitcoinGUI</name> <message> - <location filename="../bitcoingui.cpp" line="66"/> + <location filename="../bitcoingui.cpp" line="69"/> <source>Bitcoin Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="139"/> - <location filename="../bitcoingui.cpp" line="455"/> + <location filename="../bitcoingui.cpp" line="142"/> + <location filename="../bitcoingui.cpp" line="464"/> <source>Synchronizing with network...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="142"/> + <location filename="../bitcoingui.cpp" line="145"/> <source>Block chain synchronization in progress</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="171"/> + <location filename="../bitcoingui.cpp" line="176"/> <source>&Overview</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="172"/> + <location filename="../bitcoingui.cpp" line="177"/> <source>Show general overview of wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="177"/> + <location filename="../bitcoingui.cpp" line="182"/> <source>&Transactions</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="178"/> + <location filename="../bitcoingui.cpp" line="183"/> <source>Browse transaction history</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="183"/> + <location filename="../bitcoingui.cpp" line="188"/> <source>&Address Book</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="184"/> + <location filename="../bitcoingui.cpp" line="189"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="189"/> + <location filename="../bitcoingui.cpp" line="194"/> <source>&Receive coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="190"/> + <location filename="../bitcoingui.cpp" line="195"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="195"/> + <location filename="../bitcoingui.cpp" line="200"/> <source>&Send coins</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="196"/> + <location filename="../bitcoingui.cpp" line="201"/> <source>Send coins to a bitcoin address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="201"/> + <location filename="../bitcoingui.cpp" line="206"/> <source>Sign &message</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="202"/> + <location filename="../bitcoingui.cpp" line="207"/> <source>Prove you control an address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="221"/> + <location filename="../bitcoingui.cpp" line="226"/> <source>E&xit</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="222"/> + <location filename="../bitcoingui.cpp" line="227"/> <source>Quit application</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="225"/> + <location filename="../bitcoingui.cpp" line="230"/> <source>&About %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="226"/> + <location filename="../bitcoingui.cpp" line="231"/> <source>Show information about Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="228"/> + <location filename="../bitcoingui.cpp" line="233"/> <source>About &Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="229"/> + <location filename="../bitcoingui.cpp" line="234"/> <source>Show information about Qt</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="231"/> + <location filename="../bitcoingui.cpp" line="236"/> <source>&Options...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="232"/> + <location filename="../bitcoingui.cpp" line="237"/> <source>Modify configuration options for bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="234"/> + <location filename="../bitcoingui.cpp" line="239"/> <source>Open &Bitcoin</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="235"/> + <location filename="../bitcoingui.cpp" line="240"/> <source>Show the Bitcoin window</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="236"/> + <location filename="../bitcoingui.cpp" line="241"/> <source>&Export...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="237"/> - <source>Export the current view to a file</source> + <location filename="../bitcoingui.cpp" line="242"/> + <source>Export the data in the current tab to a file</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="238"/> + <location filename="../bitcoingui.cpp" line="243"/> <source>&Encrypt Wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="239"/> + <location filename="../bitcoingui.cpp" line="244"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="241"/> + <location filename="../bitcoingui.cpp" line="246"/> + <source>&Backup Wallet</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="247"/> + <source>Backup wallet to another location</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="248"/> <source>&Change Passphrase</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="242"/> + <location filename="../bitcoingui.cpp" line="249"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="264"/> + <location filename="../bitcoingui.cpp" line="272"/> <source>&File</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="271"/> + <location filename="../bitcoingui.cpp" line="281"/> <source>&Settings</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="277"/> + <location filename="../bitcoingui.cpp" line="287"/> <source>&Help</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="284"/> + <location filename="../bitcoingui.cpp" line="294"/> <source>Tabs toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="295"/> + <location filename="../bitcoingui.cpp" line="305"/> <source>Actions toolbar</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="307"/> + <location filename="../bitcoingui.cpp" line="317"/> <source>[testnet]</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="397"/> + <location filename="../bitcoingui.cpp" line="407"/> <source>bitcoin-qt</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="440"/> + <location filename="../bitcoingui.cpp" line="449"/> <source>%n active connection(s) to Bitcoin network</source> <translation type="unfinished"> <numerusform>%n active connection to Bitcoin network</numerusform> @@ -487,17 +497,17 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="466"/> + <location filename="../bitcoingui.cpp" line="475"/> <source>Downloaded %1 of %2 blocks of transaction history.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="478"/> + <location filename="../bitcoingui.cpp" line="487"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="489"/> + <location filename="../bitcoingui.cpp" line="502"/> <source>%n second(s) ago</source> <translation type="unfinished"> <numerusform>%n second ago</numerusform> @@ -505,7 +515,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="493"/> + <location filename="../bitcoingui.cpp" line="506"/> <source>%n minute(s) ago</source> <translation type="unfinished"> <numerusform>%n minute ago</numerusform> @@ -513,7 +523,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="497"/> + <location filename="../bitcoingui.cpp" line="510"/> <source>%n hour(s) ago</source> <translation type="unfinished"> <numerusform>%n hour ago</numerusform> @@ -521,7 +531,7 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message numerus="yes"> - <location filename="../bitcoingui.cpp" line="501"/> + <location filename="../bitcoingui.cpp" line="514"/> <source>%n day(s) ago</source> <translation type="unfinished"> <numerusform>%n day ago</numerusform> @@ -529,42 +539,42 @@ Are you sure you wish to encrypt your wallet?</source> </translation> </message> <message> - <location filename="../bitcoingui.cpp" line="507"/> + <location filename="../bitcoingui.cpp" line="520"/> <source>Up to date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="512"/> + <location filename="../bitcoingui.cpp" line="525"/> <source>Catching up...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="518"/> + <location filename="../bitcoingui.cpp" line="533"/> <source>Last received block was generated %1.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="585"/> + <location filename="../bitcoingui.cpp" line="597"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="590"/> + <location filename="../bitcoingui.cpp" line="602"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="617"/> + <location filename="../bitcoingui.cpp" line="629"/> <source>Sent transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="618"/> + <location filename="../bitcoingui.cpp" line="630"/> <source>Incoming transaction</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="619"/> + <location filename="../bitcoingui.cpp" line="631"/> <source>Date: %1 Amount: %2 Type: %3 @@ -573,15 +583,35 @@ Address: %4 <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="740"/> + <location filename="../bitcoingui.cpp" line="751"/> <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> <translation type="unfinished"></translation> </message> <message> - <location filename="../bitcoingui.cpp" line="748"/> + <location filename="../bitcoingui.cpp" line="759"/> <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../bitcoingui.cpp" line="782"/> + <source>Backup Wallet</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="782"/> + <source>Wallet Data (*.dat)</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="785"/> + <source>Backup Failed</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../bitcoingui.cpp" line="785"/> + <source>There was an error trying to save the wallet data to the new location.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>DisplayOptionsPage</name> @@ -766,7 +796,7 @@ Address: %4 </message> <message> <location filename="../forms/messagepage.ui" line="20"/> - <source>You can sign messages with your addresses to prove you own them. Be careful to only sign statement you agree to with full details, as phishing attacks may try to trick you into signing access to them.</source> + <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"></translation> </message> <message> @@ -974,6 +1004,16 @@ p, li { white-space: pre-wrap; } <source>&Save As...</source> <translation type="unfinished"></translation> </message> + <message> + <location filename="../qrcodedialog.cpp" line="101"/> + <source>Save Image...</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../qrcodedialog.cpp" line="101"/> + <source>PNG Images (*.png)</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SendCoinsDialog</name> @@ -1430,163 +1470,163 @@ p, li { white-space: pre-wrap; } <context> <name>TransactionView</name> <message> - <location filename="../transactionview.cpp" line="56"/> - <location filename="../transactionview.cpp" line="72"/> + <location filename="../transactionview.cpp" line="55"/> + <location filename="../transactionview.cpp" line="71"/> <source>All</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="57"/> + <location filename="../transactionview.cpp" line="56"/> <source>Today</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="58"/> + <location filename="../transactionview.cpp" line="57"/> <source>This week</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="59"/> + <location filename="../transactionview.cpp" line="58"/> <source>This month</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="60"/> + <location filename="../transactionview.cpp" line="59"/> <source>Last month</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="61"/> + <location filename="../transactionview.cpp" line="60"/> <source>This year</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="62"/> + <location filename="../transactionview.cpp" line="61"/> <source>Range...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="73"/> + <location filename="../transactionview.cpp" line="72"/> <source>Received with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="75"/> + <location filename="../transactionview.cpp" line="74"/> <source>Sent to</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="77"/> + <location filename="../transactionview.cpp" line="76"/> <source>To yourself</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="78"/> + <location filename="../transactionview.cpp" line="77"/> <source>Mined</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="79"/> + <location filename="../transactionview.cpp" line="78"/> <source>Other</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="85"/> + <location filename="../transactionview.cpp" line="84"/> <source>Enter address or label to search</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="91"/> + <location filename="../transactionview.cpp" line="90"/> <source>Min amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="125"/> + <location filename="../transactionview.cpp" line="124"/> <source>Copy address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="126"/> + <location filename="../transactionview.cpp" line="125"/> <source>Copy label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="127"/> + <location filename="../transactionview.cpp" line="126"/> <source>Copy amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="128"/> + <location filename="../transactionview.cpp" line="127"/> <source>Edit label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="129"/> + <location filename="../transactionview.cpp" line="128"/> <source>Show details...</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="269"/> + <location filename="../transactionview.cpp" line="268"/> <source>Export Transaction Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="271"/> + <location filename="../transactionview.cpp" line="269"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="279"/> + <location filename="../transactionview.cpp" line="277"/> <source>Confirmed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="280"/> + <location filename="../transactionview.cpp" line="278"/> <source>Date</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="281"/> + <location filename="../transactionview.cpp" line="279"/> <source>Type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="282"/> + <location filename="../transactionview.cpp" line="280"/> <source>Label</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="283"/> + <location filename="../transactionview.cpp" line="281"/> <source>Address</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="284"/> + <location filename="../transactionview.cpp" line="282"/> <source>Amount</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="285"/> + <location filename="../transactionview.cpp" line="283"/> <source>ID</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="289"/> + <location filename="../transactionview.cpp" line="287"/> <source>Error exporting</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="289"/> + <location filename="../transactionview.cpp" line="287"/> <source>Could not write to file %1.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="384"/> + <location filename="../transactionview.cpp" line="382"/> <source>Range:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../transactionview.cpp" line="392"/> + <location filename="../transactionview.cpp" line="390"/> <source>to</source> <translation type="unfinished"></translation> </message> @@ -1594,7 +1634,7 @@ p, li { white-space: pre-wrap; } <context> <name>WalletModel</name> <message> - <location filename="../walletmodel.cpp" line="144"/> + <location filename="../walletmodel.cpp" line="145"/> <source>Sending...</source> <translation type="unfinished"></translation> </message> @@ -1943,12 +1983,4 @@ SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"></translation> </message> </context> -<context> - <name>main</name> - <message> - <location filename="../bitcoin.cpp" line="188"/> - <source>Bitcoin-Qt</source> - <translation type="unfinished"></translation> - </message> -</context> </TS> diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp index a2314caa47..e668079536 100644 --- a/src/qt/notificator.cpp +++ b/src/qt/notificator.cpp @@ -52,10 +52,13 @@ Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, OSStatus status = LSGetApplicationForInfo(kLSUnknownType, kLSUnknownCreator, CFSTR("growlTicket"), kLSRolesAll, 0, &cfurl); if (status != kLSApplicationNotFoundErr) { CFBundleRef bundle = CFBundleCreate(0, cfurl); - CFRelease(cfurl); if (CFStringCompare(CFBundleGetIdentifier(bundle), CFSTR("com.Growl.GrowlHelperApp"), kCFCompareCaseInsensitive | kCFCompareBackwards) == kCFCompareEqualTo) { - mode = Growl; + if (CFStringHasSuffix(CFURLGetString(cfurl), CFSTR("/Growl.app/"))) + mode = Growl13; + else + mode = Growl12; } + CFRelease(cfurl); CFRelease(bundle); } #endif @@ -226,7 +229,7 @@ void Notificator::notifySystray(Class cls, const QString &title, const QString & void Notificator::notifyGrowl(Class cls, const QString &title, const QString &text, const QIcon &icon) { const QString script( - "tell application \"GrowlHelperApp\"\n" + "tell application \"%5\"\n" " set the allNotificationsList to {\"Notification\"}\n" // -- Make a list of all the notification types (all) " set the enabledNotificationsList to {\"Notification\"}\n" // -- Make a list of the notifications (enabled) " register as application \"%1\" all notifications allNotificationsList default notifications enabledNotificationsList\n" // -- Register our script with Growl @@ -265,7 +268,8 @@ void Notificator::notifyGrowl(Class cls, const QString &title, const QString &te QString quotedTitle(title), quotedText(text); quotedTitle.replace("\\", "\\\\").replace("\"", "\\"); quotedText.replace("\\", "\\\\").replace("\"", "\\"); - qt_mac_execute_apple_script(script.arg(notificationApp, quotedTitle, quotedText, notificationIcon), 0); + QString growlApp(this->mode == Notificator::Growl13 ? "Growl" : "GrowlHelperApp"); + qt_mac_execute_apple_script(script.arg(notificationApp, quotedTitle, quotedText, notificationIcon, growlApp), 0); } #endif @@ -282,7 +286,8 @@ void Notificator::notify(Class cls, const QString &title, const QString &text, c notifySystray(cls, title, text, icon, millisTimeout); break; #ifdef Q_WS_MAC - case Growl: + case Growl12: + case Growl13: notifyGrowl(cls, title, text, icon); break; #endif diff --git a/src/qt/notificator.h b/src/qt/notificator.h index 2d83013a7f..0271c26f48 100644 --- a/src/qt/notificator.h +++ b/src/qt/notificator.h @@ -49,7 +49,8 @@ private: None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */ Freedesktop, /**< Use DBus org.freedesktop.Notifications */ QSystemTray, /**< Use QSystemTray::showMessage */ - Growl /**< Use the Growl notification system (Mac only) */ + Growl12, /**< Use the Growl 1.2 notification system (Mac only) */ + Growl13 /**< Use the Growl 1.3 notification system (Mac only) */ }; QString programName; Mode mode; diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index d98400c260..caffaaeff2 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -66,6 +66,7 @@ void SendCoinsEntry::on_payTo_textChanged(const QString &address) void SendCoinsEntry::setModel(WalletModel *model) { this->model = model; + clear(); } void SendCoinsEntry::setRemoveEnabled(bool enabled) diff --git a/src/uint256.h b/src/uint256.h index caf6fa118b..783e7069e9 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -348,6 +348,10 @@ public: return sizeof(pn); } + uint64 Get64(int n=0) const + { + return pn[2*n] | (uint64)pn[2*n+1] << 32; + } unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const { |