diff options
42 files changed, 504 insertions, 296 deletions
diff --git a/.travis.yml b/.travis.yml index af9c476dc1..a6c51753b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ env: - CCACHE_TEMPDIR=/tmp/.ccache-temp - CCACHE_COMPRESS=1 - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out - - SDK_URL=https://bitcoin.jonasschnelli.ch/sdks + - SDK_URL=https://bitcoincore.org/depends-sources/sdks - PYTHON_DEBUG=1 - WINEDEBUG=fixme-all matrix: diff --git a/configure.ac b/configure.ac index 97af58bd7c..496e4ad9e7 100644 --- a/configure.ac +++ b/configure.ac @@ -583,7 +583,7 @@ BITCOIN_QT_INIT dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt5]) -if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then +if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononono; then use_boost=no else use_boost=yes diff --git a/doc/bips.md b/doc/bips.md index 62bde20d94..039d5114fd 100644 --- a/doc/bips.md +++ b/doc/bips.md @@ -18,11 +18,11 @@ BIPs that are implemented by Bitcoin Core (up-to-date up to **v0.13.0**): * [`BIP 61`](https://github.com/bitcoin/bips/blob/master/bip-0061.mediawiki): The 'reject' protocol message (and the protocol version bump to 70002) was added in **v0.9.0** ([PR #3185](https://github.com/bitcoin/bitcoin/pull/3185)). * [`BIP 65`](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki): The CHECKLOCKTIMEVERIFY softfork was merged in **v0.12.0** ([PR #6351](https://github.com/bitcoin/bitcoin/pull/6351)), and backported to **v0.11.2** and **v0.10.4**. Mempool-only CLTV was added in [PR #6124](https://github.com/bitcoin/bitcoin/pull/6124). * [`BIP 66`](https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki): The strict DER rules and associated version 3 blocks have been implemented since **v0.10.0** ([PR #5713](https://github.com/bitcoin/bitcoin/pull/5713)). -* [`BIP 68`](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki): Sequence locks have been implemented as of **v0.12.1** ([PR #7184](https://github.com/bitcoin/bitcoin/pull/7184)). +* [`BIP 68`](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki): Sequence locks have been implemented as of **v0.12.1** ([PR #7184](https://github.com/bitcoin/bitcoin/pull/7184)), and have been activated since *block 419328*. * [`BIP 70`](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki) [`71`](https://github.com/bitcoin/bips/blob/master/bip-0071.mediawiki) [`72`](https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki): Payment Protocol support has been available in Bitcoin Core GUI since **v0.9.0** ([PR #5216](https://github.com/bitcoin/bitcoin/pull/5216)). * [`BIP 111`](https://github.com/bitcoin/bips/blob/master/bip-0111.mediawiki): `NODE_BLOOM` service bit added, and enforced for all peer versions as of **v0.13.0** ([PR #6579](https://github.com/bitcoin/bitcoin/pull/6579) and [PR #6641](https://github.com/bitcoin/bitcoin/pull/6641)). -* [`BIP 112`](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki): The CHECKSEQUENCEVERIFY opcode has been implemented since **v0.12.1** ([PR #7524](https://github.com/bitcoin/bitcoin/pull/7524)). -* [`BIP 113`](https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki): Median time past lock-time calculations have been implemented since **v0.12.1** ([PR #6566](https://github.com/bitcoin/bitcoin/pull/6566)). +* [`BIP 112`](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki): The CHECKSEQUENCEVERIFY opcode has been implemented since **v0.12.1** ([PR #7524](https://github.com/bitcoin/bitcoin/pull/7524)) and has been activated since *block 419328*. +* [`BIP 113`](https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki): Median time past lock-time calculations have been implemented since **v0.12.1** ([PR #6566](https://github.com/bitcoin/bitcoin/pull/6566)) and have been activated since *block 419328*. * [`BIP 125`](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki): Opt-in full replace-by-fee signaling honoured in mempool and mining as of **v0.12.0** ([PR 6871](https://github.com/bitcoin/bitcoin/pull/6871)). * [`BIP 130`](https://github.com/bitcoin/bips/blob/master/bip-0130.mediawiki): direct headers announcement is negotiated with peer versions `>=70012` as of **v0.12.0** ([PR 6494](https://github.com/bitcoin/bitcoin/pull/6494)). * [`BIP 133`](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki): feefilter messages are respected and sent for peer versions `>=70013` as of **v0.13.0** ([PR 7542](https://github.com/bitcoin/bitcoin/pull/7542)). diff --git a/doc/release-notes.md b/doc/release-notes.md index e1f3e2427e..3d2baaaaea 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -41,9 +41,21 @@ report issues about Windows XP to the issue tracker. Notable changes =============== -Example item ----------------- +Database cache memory increased +-------------------------------- + +As a result of growth of the UTXO set, performance with the prior default +database cache of 100 MiB has suffered. +For this reason the default was changed to 300 MiB in this release. + +For nodes on low-memory systems, the database cache can be changed back to +100 MiB (or to another value) by either: + +- Adding `dbcache=100` in bitcoin.conf +- Changing it in the GUI under `Options → Size of database cache` +Note that the database cache setting has the most performance impact +during initial sync of a node, and when catching up after downtime. bitcoin-cli: arguments privacy -------------------------------- diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 37979a933f..11b83bac14 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -106,6 +106,7 @@ testScripts = [ 'walletbackup.py', 'bip68-112-113-p2p.py', 'wallet.py', + 'wallet-hd.py', 'listtransactions.py', 'receivedby.py', 'mempool_resurrect_test.py', diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py index d225e29b50..7cbe69c29b 100755 --- a/qa/rpc-tests/pruning.py +++ b/qa/rpc-tests/pruning.py @@ -151,14 +151,14 @@ class PruneTest(BitcoinTestFramework): print("Reconnect nodes") connect_nodes(self.nodes[0], 1) connect_nodes(self.nodes[2], 1) - sync_blocks(self.nodes[0:3]) + sync_blocks(self.nodes[0:3], timeout=120) print("Verify height on node 2:",self.nodes[2].getblockcount()) print("Usage possibly still high bc of stale blocks in block files:", calc_usage(self.prunedir)) print("Mine 220 more blocks so we have requisite history (some blocks will be big and cause pruning of previous chain)") self.nodes[0].generate(220) #node 0 has many large tx's in its mempool from the disconnects - sync_blocks(self.nodes[0:3]) + sync_blocks(self.nodes[0:3], timeout=300) usage = calc_usage(self.prunedir) print("Usage should be below target:", usage) diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index 30e8b5755d..0dfece6b27 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -20,6 +20,7 @@ from .util import ( sync_blocks, sync_mempools, stop_nodes, + stop_node, wait_bitcoinds, enable_coverage, check_json_precision, @@ -49,6 +50,9 @@ class BitcoinTestFramework(object): else: initialize_chain(self.options.tmpdir, self.num_nodes) + def stop_node(self, num_node): + stop_node(self.nodes[num_node], num_node) + def setup_nodes(self): return start_nodes(self.num_nodes, self.options.tmpdir) diff --git a/qa/rpc-tests/wallet-hd.py b/qa/rpc-tests/wallet-hd.py new file mode 100755 index 0000000000..845eec027b --- /dev/null +++ b/qa/rpc-tests/wallet-hd.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python3 +# Copyright (c) 2016 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import ( + start_nodes, + start_node, + assert_equal, + connect_nodes_bi, +) +import os +import shutil + + +class WalletHDTest(BitcoinTestFramework): + + def __init__(self): + super().__init__() + self.setup_clean_chain = True + self.num_nodes = 2 + self.node_args = [['-usehd=0'], ['-usehd=1', '-keypool=0']] + + def setup_network(self): + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.node_args) + self.is_network_split = False + connect_nodes_bi(self.nodes, 0, 1) + + def run_test (self): + tmpdir = self.options.tmpdir + + # Import a non-HD private key in the HD wallet + non_hd_add = self.nodes[0].getnewaddress() + self.nodes[1].importprivkey(self.nodes[0].dumpprivkey(non_hd_add)) + + # This should be enough to keep the master key and the non-HD key + self.nodes[1].backupwallet(tmpdir + "hd.bak") + #self.nodes[1].dumpwallet(tmpdir + "hd.dump") + + # Derive some HD addresses and remember the last + # Also send funds to each add + self.nodes[0].generate(101) + hd_add = None + num_hd_adds = 300 + for _ in range(num_hd_adds): + hd_add = self.nodes[1].getnewaddress() + self.nodes[0].sendtoaddress(hd_add, 1) + self.nodes[0].generate(1) + self.nodes[0].sendtoaddress(non_hd_add, 1) + self.nodes[0].generate(1) + + self.sync_all() + assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1) + + print("Restore backup ...") + self.stop_node(1) + os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat") + shutil.copyfile(tmpdir + "hd.bak", tmpdir + "/node1/regtest/wallet.dat") + self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1]) + #connect_nodes_bi(self.nodes, 0, 1) + + # Assert that derivation is deterministic + hd_add_2 = None + for _ in range(num_hd_adds): + hd_add_2 = self.nodes[1].getnewaddress() + assert_equal(hd_add, hd_add_2) + + # Needs rescan + self.stop_node(1) + self.nodes[1] = start_node(1, self.options.tmpdir, self.node_args[1] + ['-rescan']) + #connect_nodes_bi(self.nodes, 0, 1) + assert_equal(self.nodes[1].getbalance(), num_hd_adds + 1) + + +if __name__ == '__main__': + WalletHDTest().main () diff --git a/share/setup.nsi.in b/share/setup.nsi.in index c062f96a30..dd42085a27 100644 --- a/share/setup.nsi.in +++ b/share/setup.nsi.in @@ -92,6 +92,7 @@ Section -post SEC0001 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory $SMPROGRAMS\$StartMenuGroup CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@ + CreateShortcut "$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" "-testnet" "$INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@" 1 CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe !insertmacro MUI_STARTMENU_WRITE_END WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" @@ -135,6 +136,7 @@ Section -un.post UNSEC0001 DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" + Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\@PACKAGE_NAME@ (testnet, @WINDOWS_BITS@-bit).lnk" Delete /REBOOTOK "$SMSTARTUP\Bitcoin.lnk" Delete /REBOOTOK $INSTDIR\uninstall.exe Delete /REBOOTOK $INSTDIR\debug.log diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index 36a21dd06f..ca2c7b2eb0 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -231,6 +231,7 @@ RES_ICONS = \ qt/res/icons/about.png \ qt/res/icons/about_qt.png \ qt/res/icons/bitcoin.ico \ + qt/res/icons/bitcoin_testnet.ico \ qt/res/icons/bitcoin.png \ qt/res/icons/chevron.png \ qt/res/icons/clock1.png \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index c8918eb53f..27e7694748 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -38,7 +38,6 @@ BITCOIN_TESTS =\ test/arith_uint256_tests.cpp \ test/scriptnum10.h \ test/addrman_tests.cpp \ - test/alert_tests.cpp \ test/amount_tests.cpp \ test/allocator_tests.cpp \ test/base32_tests.cpp \ diff --git a/src/init.cpp b/src/init.cpp index ea4ccaddfc..7e91e0ba8b 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1216,10 +1216,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greated than nMaxDbcache int64_t nBlockTreeDBCache = nTotalCache / 8; - if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", DEFAULT_TXINDEX)) - nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB + nBlockTreeDBCache = std::min(nBlockTreeDBCache, (GetBoolArg("-txindex", DEFAULT_TXINDEX) ? nMaxBlockDBAndTxIndexCache : nMaxBlockDBCache) << 20); nTotalCache -= nBlockTreeDBCache; int64_t nCoinDBCache = std::min(nTotalCache / 2, (nTotalCache / 4) + (1 << 23)); // use 25%-50% of the remainder for disk cache + nCoinDBCache = std::min(nCoinDBCache, nMaxCoinsDBCache << 20); // cap total coins db cache nTotalCache -= nCoinDBCache; nCoinCacheUsage = nTotalCache; // the rest goes to in-memory cache LogPrintf("Cache configuration:\n"); @@ -1447,12 +1447,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) StartNode(threadGroup, scheduler); - // Monitor the chain, and alert if we get blocks much quicker or slower than expected - int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing; - CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload, - boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing); - scheduler.scheduleEvery(f, nPowTargetSpacing); - // ********************************************************* Step 12: finished SetRPCWarmupFinished(); diff --git a/src/main.cpp b/src/main.cpp index 6cdd55e397..b86bbda1b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2240,68 +2240,6 @@ void ThreadScriptCheck() { scriptcheckqueue.Thread(); } -// -// Called periodically asynchronously; alerts if it smells like -// we're being fed a bad chain (blocks being generated much -// too slowly or too quickly). -// -void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CBlockIndex *const &bestHeader, - int64_t nPowTargetSpacing) -{ - if (bestHeader == NULL || initialDownloadCheck()) return; - - static int64_t lastAlertTime = 0; - int64_t now = GetAdjustedTime(); - if (lastAlertTime > now-60*60*24) return; // Alert at most once per day - - const int SPAN_HOURS=4; - const int SPAN_SECONDS=SPAN_HOURS*60*60; - int BLOCKS_EXPECTED = SPAN_SECONDS / nPowTargetSpacing; - - boost::math::poisson_distribution<double> poisson(BLOCKS_EXPECTED); - - std::string strWarning; - int64_t startTime = GetAdjustedTime()-SPAN_SECONDS; - - LOCK(cs); - const CBlockIndex* i = bestHeader; - int nBlocks = 0; - while (i->GetBlockTime() >= startTime) { - ++nBlocks; - i = i->pprev; - if (i == NULL) return; // Ran out of chain, we must not be fully sync'ed - } - - // How likely is it to find that many by chance? - double p = boost::math::pdf(poisson, nBlocks); - - LogPrint("partitioncheck", "%s: Found %d blocks in the last %d hours\n", __func__, nBlocks, SPAN_HOURS); - LogPrint("partitioncheck", "%s: likelihood: %g\n", __func__, p); - - // Aim for one false-positive about every fifty years of normal running: - const int FIFTY_YEARS = 50*365*24*60*60; - double alertThreshold = 1.0 / (FIFTY_YEARS / SPAN_SECONDS); - - if (p <= alertThreshold && nBlocks < BLOCKS_EXPECTED) - { - // Many fewer blocks than expected: alert! - strWarning = strprintf(_("WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)"), - nBlocks, SPAN_HOURS, BLOCKS_EXPECTED); - } - else if (p <= alertThreshold && nBlocks > BLOCKS_EXPECTED) - { - // Many more blocks than expected: alert! - strWarning = strprintf(_("WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)"), - nBlocks, SPAN_HOURS, BLOCKS_EXPECTED); - } - if (!strWarning.empty()) - { - strMiscWarning = strWarning; - AlertNotify(strWarning); - lastAlertTime = now; - } -} - // Protected by cs_main VersionBitsCache versionbitscache; @@ -5835,13 +5773,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, return true; } - // If we already know the last header in the message, then it contains - // no new information for us. In this case, we do not request - // more headers later. This prevents multiple chains of redundant - // getheader requests from running in parallel if triggered by incoming - // blocks while the node is still in initial headers sync. - const bool hasNewHeaders = (mapBlockIndex.count(headers.back().GetHash()) == 0); - CBlockIndex *pindexLast = NULL; BOOST_FOREACH(const CBlockHeader& header, headers) { CValidationState state; @@ -5862,7 +5793,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, assert(pindexLast); UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash()); - if (nCount == MAX_HEADERS_RESULTS && hasNewHeaders) { + if (nCount == MAX_HEADERS_RESULTS) { // Headers message had its maximum size; the peer may have more headers. // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue // from there instead. diff --git a/src/main.h b/src/main.h index 2ffe5770dc..7ea570d859 100644 --- a/src/main.h +++ b/src/main.h @@ -247,8 +247,6 @@ bool ProcessMessages(CNode* pfrom); bool SendMessages(CNode* pto); /** Run an instance of the script checking thread */ void ThreadScriptCheck(); -/** Try to detect Partition (network isolation) attacks against us */ -void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CBlockIndex *const &bestHeader, int64_t nPowTargetSpacing); /** Check whether we are doing an initial block download (synchronizing from disk or network) */ bool IsInitialBlockDownload(); /** Format a string that describes several potential problems detected by the core. diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp index 7cf32cd34e..9c5b1e09d4 100644 --- a/src/qt/bitcoinstrings.cpp +++ b/src/qt/bitcoinstrings.cpp @@ -186,12 +186,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "" "comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is " "included in share/rpcuser. This option can be specified multiple times"), QT_TRANSLATE_NOOP("bitcoin-core", "" -"WARNING: abnormally high number of blocks generated, %d blocks received in " -"the last %d hours (%d expected)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" -"WARNING: check your network connection, %d blocks received in the last %d " -"hours (%d expected)"), -QT_TRANSLATE_NOOP("bitcoin-core", "" "Warning: The network does not appear to fully agree! Some miners appear to " "be experiencing issues."), QT_TRANSLATE_NOOP("bitcoin-core", "" diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 108500654b..14661b857a 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -179,11 +179,6 @@ bool ClientModel::isReleaseVersion() const return CLIENT_VERSION_IS_RELEASE; } -QString ClientModel::clientName() const -{ - return QString::fromStdString(CLIENT_NAME); -} - QString ClientModel::formatClientStartupTime() const { return QDateTime::fromTime_t(nClientStartupTime).toString(); diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h index 4396804319..99fd574b9e 100644 --- a/src/qt/clientmodel.h +++ b/src/qt/clientmodel.h @@ -73,7 +73,6 @@ public: QString formatFullVersion() const; QString formatSubVersion() const; bool isReleaseVersion() const; - QString clientName() const; QString formatClientStartupTime() const; QString dataDir() const; diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index c17efcf1b3..9dc641979e 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -41,36 +41,13 @@ </widget> </item> <item row="1" column="0"> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Client name</string> - </property> - </widget> - </item> - <item row="1" column="1" colspan="2"> - <widget class="QLabel" name="clientName"> - <property name="cursor"> - <cursorShape>IBeamCursor</cursorShape> - </property> - <property name="text"> - <string>N/A</string> - </property> - <property name="textFormat"> - <enum>Qt::PlainText</enum> - </property> - <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> - </property> - </widget> - </item> - <item row="2" column="0"> <widget class="QLabel" name="label_6"> <property name="text"> <string>Client version</string> </property> </widget> </item> - <item row="2" column="1" colspan="2"> + <item row="1" column="1" colspan="2"> <widget class="QLabel" name="clientVersion"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -86,7 +63,7 @@ </property> </widget> </item> - <item row="3" column="0"> + <item row="2" column="0"> <widget class="QLabel" name="labelClientUserAgent"> <property name="text"> <string>User Agent</string> @@ -96,7 +73,7 @@ </property> </widget> </item> - <item row="3" column="1" colspan="2"> + <item row="2" column="1" colspan="2"> <widget class="QLabel" name="clientUserAgent"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -112,7 +89,7 @@ </property> </widget> </item> - <item row="4" column="0"> + <item row="3" column="0"> <widget class="QLabel" name="label_berkeleyDBVersion"> <property name="text"> <string>Using BerkeleyDB version</string> @@ -122,7 +99,7 @@ </property> </widget> </item> - <item row="4" column="1" colspan="2"> + <item row="3" column="1" colspan="2"> <widget class="QLabel" name="berkeleyDBVersion"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -138,14 +115,14 @@ </property> </widget> </item> - <item row="5" column="0"> + <item row="4" column="0"> <widget class="QLabel" name="label_12"> <property name="text"> <string>Datadir</string> </property> </widget> </item> - <item row="5" column="1" colspan="2"> + <item row="4" column="1" colspan="2"> <widget class="QLabel" name="dataDir"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -164,14 +141,14 @@ </property> </widget> </item> - <item row="6" column="0"> + <item row="5" column="0"> <widget class="QLabel" name="label_13"> <property name="text"> <string>Startup time</string> </property> </widget> </item> - <item row="6" column="1" colspan="2"> + <item row="5" column="1" colspan="2"> <widget class="QLabel" name="startupTime"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -187,7 +164,7 @@ </property> </widget> </item> - <item row="7" column="0"> + <item row="6" column="0"> <widget class="QLabel" name="labelNetwork"> <property name="font"> <font> @@ -200,14 +177,14 @@ </property> </widget> </item> - <item row="8" column="0"> + <item row="7" column="0"> <widget class="QLabel" name="label_8"> <property name="text"> <string>Name</string> </property> </widget> </item> - <item row="8" column="1" colspan="2"> + <item row="7" column="1" colspan="2"> <widget class="QLabel" name="networkName"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -223,14 +200,14 @@ </property> </widget> </item> - <item row="9" column="0"> + <item row="8" column="0"> <widget class="QLabel" name="label_7"> <property name="text"> <string>Number of connections</string> </property> </widget> </item> - <item row="9" column="1" colspan="2"> + <item row="8" column="1" colspan="2"> <widget class="QLabel" name="numberOfConnections"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -246,7 +223,7 @@ </property> </widget> </item> - <item row="10" column="0"> + <item row="9" column="0"> <widget class="QLabel" name="label_10"> <property name="font"> <font> @@ -259,14 +236,14 @@ </property> </widget> </item> - <item row="11" column="0"> + <item row="10" column="0"> <widget class="QLabel" name="label_3"> <property name="text"> <string>Current number of blocks</string> </property> </widget> </item> - <item row="11" column="1" colspan="2"> + <item row="10" column="1" colspan="2"> <widget class="QLabel" name="numberOfBlocks"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -282,14 +259,14 @@ </property> </widget> </item> - <item row="12" column="0"> + <item row="11" column="0"> <widget class="QLabel" name="labelLastBlockTime"> <property name="text"> <string>Last block time</string> </property> </widget> </item> - <item row="12" column="1" colspan="2"> + <item row="11" column="1" colspan="2"> <widget class="QLabel" name="lastBlockTime"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -305,7 +282,7 @@ </property> </widget> </item> - <item row="13" column="0"> + <item row="12" column="0"> <widget class="QLabel" name="labelMempoolTitle"> <property name="font"> <font> @@ -318,14 +295,14 @@ </property> </widget> </item> - <item row="14" column="0"> + <item row="13" column="0"> <widget class="QLabel" name="labelNumberOfTransactions"> <property name="text"> <string>Current number of transactions</string> </property> </widget> </item> - <item row="14" column="1"> + <item row="13" column="1"> <widget class="QLabel" name="mempoolNumberTxs"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -341,14 +318,14 @@ </property> </widget> </item> - <item row="15" column="0"> + <item row="14" column="0"> <widget class="QLabel" name="labelMemoryUsage"> <property name="text"> <string>Memory usage</string> </property> </widget> </item> - <item row="15" column="1"> + <item row="14" column="1"> <widget class="QLabel" name="mempoolSize"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -364,7 +341,7 @@ </property> </widget> </item> - <item row="13" column="2" rowspan="3"> + <item row="12" column="2" rowspan="3"> <layout class="QVBoxLayout" name="verticalLayoutDebugButton"> <property name="spacing"> <number>3</number> @@ -404,7 +381,7 @@ </item> </layout> </item> - <item row="16" column="0"> + <item row="15" column="0"> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 4327de9b0c..947a4c6821 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -107,6 +107,23 @@ QFont fixedPitchFont() #endif } +// Just some dummy data to generate an convincing random-looking (but consistent) address +static const uint8_t dummydata[] = {0xeb,0x15,0x23,0x1d,0xfc,0xeb,0x60,0x92,0x58,0x86,0xb6,0x7d,0x06,0x52,0x99,0x92,0x59,0x15,0xae,0xb1,0x72,0xc0,0x66,0x47}; + +// Generate a dummy address with invalid CRC, starting with the network prefix. +static std::string DummyAddress(const CChainParams ¶ms) +{ + std::vector<unsigned char> sourcedata = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS); + sourcedata.insert(sourcedata.end(), dummydata, dummydata + sizeof(dummydata)); + for(int i=0; i<256; ++i) { // Try every trailing byte + std::string s = EncodeBase58(begin_ptr(sourcedata), end_ptr(sourcedata)); + if (!CBitcoinAddress(s).IsValid()) + return s; + sourcedata[sourcedata.size()-1] += 1; + } + return ""; +} + void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) { parent->setFocusProxy(widget); @@ -115,7 +132,8 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent) #if QT_VERSION >= 0x040700 // We don't want translators to use own addresses in translations // and this is the only place, where this address is supplied. - widget->setPlaceholderText(QObject::tr("Enter a Bitcoin address (e.g. %1)").arg("1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L")); + widget->setPlaceholderText(QObject::tr("Enter a Bitcoin address (e.g. %1)").arg( + QString::fromStdString(DummyAddress(Params())))); #endif widget->setValidator(new BitcoinAddressEntryValidator(parent)); widget->setCheckValidator(new BitcoinAddressCheckValidator(parent)); diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts index 3bb8813182..bd85d8c8b0 100644 --- a/src/qt/locale/bitcoin_bg.ts +++ b/src/qt/locale/bitcoin_bg.ts @@ -64,6 +64,10 @@ <context> <name>BanTableModel</name> <message> + <source>IP/Netmask</source> + <translation>IP/Netmask</translation> + </message> + <message> <source>Banned Until</source> <translation>Със забранен достъп до</translation> </message> @@ -107,6 +111,14 @@ <translation>Изход от приложението</translation> </message> <message> + <source>&About %1</source> + <translation>Относно %1</translation> + </message> + <message> + <source>Show information about %1</source> + <translation>Покажи информация относно %1</translation> + </message> + <message> <source>About &Qt</source> <translation>За &Qt</translation> </message> @@ -119,6 +131,10 @@ <translation>&Опции...</translation> </message> <message> + <source>Modify configuration options for %1</source> + <translation>Промени настройки за %1</translation> + </message> + <message> <source>&Encrypt Wallet...</source> <translation>&Шифриране на портфейла...</translation> </message> @@ -143,6 +159,10 @@ <translation>Отвори &URI...</translation> </message> <message> + <source>Reindexing blocks on disk...</source> + <translation>Повторно индексиране на блоковете на диска...</translation> + </message> + <message> <source>Send coins to a Bitcoin address</source> <translation>Изпращане към Биткоин адрес</translation> </message> @@ -238,14 +258,46 @@ <source>&Command-line options</source> <translation>&Налични команди</translation> </message> + <message numerus="yes"> + <source>%n active connection(s) to Bitcoin network</source> + <translation><numerusform>%n активна връзка към Биткойн мрежата</numerusform><numerusform>%n активни връзки към Биткойн мрежата</numerusform></translation> + </message> + <message> + <source>Indexing blocks on disk...</source> + <translation>Индексиране на блокове на диска...</translation> + </message> + <message> + <source>Processing blocks on disk...</source> + <translation>Обработване на блокове на диска...</translation> + </message> <message> <source>No block source available...</source> <translation>Липсва източник на блоковете...</translation> </message> + <message numerus="yes"> + <source>Processed %n block(s) of transaction history.</source> + <translation><numerusform>Преработен %n блок от историята с транзакции.</numerusform><numerusform>Преработени %n блокове от историята с транзакции.</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n hour(s)</source> + <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n day(s)</source> + <translation><numerusform>%n ден</numerusform><numerusform>%n дни</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n week(s)</source> + <translation><numerusform>%n седмица</numerusform><numerusform>%n седмици</numerusform></translation> + </message> <message> <source>%1 and %2</source> <translation>%1 и %2</translation> </message> + <message numerus="yes"> + <source>%n year(s)</source> + <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform></translation> + </message> <message> <source>%1 behind</source> <translation>%1 зад</translation> @@ -275,6 +327,14 @@ <translation>Синхронизиран</translation> </message> <message> + <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source> + <translation>Покажи %1 помощно съобщение за да получиш лист с възможни Биткойн команди</translation> + </message> + <message> + <source>%1 client</source> + <translation>%1 клиент</translation> + </message> + <message> <source>Catching up...</source> <translation>Зарежда блокове...</translation> </message> @@ -415,6 +475,14 @@ <translation>&Име</translation> </message> <message> + <source>The label associated with this address list entry</source> + <translation>Етикетът свързан с това въведение в листа с адреси</translation> + </message> + <message> + <source>The address associated with this address list entry. This can only be modified for sending addresses.</source> + <translation>Адресът свързан с това въведение в листа с адреси. Това може да бъде променено само за адреси за изпращане.</translation> + </message> + <message> <source>&Address</source> <translation>&Адрес</translation> </message> @@ -453,6 +521,10 @@ <translation>(%1-битов)</translation> </message> <message> + <source>About %1</source> + <translation>Относно %1</translation> + </message> + <message> <source>Command-line options</source> <translation>Списък с команди</translation> </message> @@ -464,7 +536,35 @@ <source>command-line options</source> <translation>Списък с налични команди</translation> </message> - </context> + <message> + <source>UI Options:</source> + <translation>Опции на интерфейс:</translation> + </message> + <message> + <source>Choose data directory on startup (default: %u)</source> + <translation>Избери директория за данни при стартирване (по подразбиране: %u)</translation> + </message> + <message> + <source>Set language, for example "de_DE" (default: system locale)</source> + <translation>Избери език, примерно "de_DE" (по подразбиране: system locale)</translation> + </message> + <message> + <source>Start minimized</source> + <translation>Стартирай минимизиран</translation> + </message> + <message> + <source>Set SSL root certificates for payment request (default: -system-)</source> + <translation>Задай SSL root сертификат за молба за изплащане (по подразбиране: -system-)</translation> + </message> + <message> + <source>Show splash screen on startup (default: %u)</source> + <translation>Покажи splash екран при стартирване (по подразбиране %u)</translation> + </message> + <message> + <source>Reset all settings changed in the GUI</source> + <translation>Нулиране на всички настройки променени в GUI</translation> + </message> +</context> <context> <name>Intro</name> <message> @@ -472,6 +572,10 @@ <translation>Добре дошли</translation> </message> <message> + <source>Welcome to %1.</source> + <translation>Добре дошли в %1.</translation> + </message> + <message> <source>Use the default data directory</source> <translation>Използване на директория по подразбиране</translation> </message> @@ -483,13 +587,29 @@ <source>Error</source> <translation>Грешка</translation> </message> - </context> + <message numerus="yes"> + <source>%n GB of free space available</source> + <translation><numerusform>%n GB свободно пространство на разположение</numerusform><numerusform>%n GB свободно пространство на разположение</numerusform></translation> + </message> + <message numerus="yes"> + <source>(of %n GB needed)</source> + <translation><numerusform>(%n GB е нужен)</numerusform><numerusform>(%n GB са нужни)</numerusform></translation> + </message> +</context> <context> <name>OpenURIDialog</name> <message> <source>Open URI</source> <translation>Отваряне на URI</translation> </message> + <message> + <source>Open payment request from URI or file</source> + <translation>Отвори молба за изплащане от URI или файл</translation> + </message> + <message> + <source>URI:</source> + <translation>URI:</translation> + </message> </context> <context> <name>OptionsDialog</name> diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts index 91903088cf..fd1a4a0863 100644 --- a/src/qt/locale/bitcoin_da.ts +++ b/src/qt/locale/bitcoin_da.ts @@ -1879,6 +1879,10 @@ <translation>Dette er en foreløbig testudgivelse - brug på eget ansvar - brug ikke til udvinding eller handelsprogrammer</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>Kan ikke spole databasen tilbage til en tilstand inden en splitning. Du er nødt til at downloade blokkæden igen</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>Brug UPnP for at konfigurere den lyttende port (standard: 1 under lytning og ingen -proxy)</translation> </message> @@ -2099,10 +2103,18 @@ <translation>Genopbyg kædetilstand ud fra de aktuelt indekserede blokke</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>Spoler blokke tilbage…</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>Sæt maksimal blokudgift (standard: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>Sæt maksimum blokstørrelse i byte (standard: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts index 639bc3cf2f..77482c774b 100644 --- a/src/qt/locale/bitcoin_de.ts +++ b/src/qt/locale/bitcoin_de.ts @@ -1010,6 +1010,10 @@ <translation>Verwendete BerkeleyDB-Version</translation> </message> <message> + <source>Datadir</source> + <translation>Datenverz</translation> + </message> + <message> <source>Startup time</source> <translation>Startzeit</translation> </message> diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index 9723ffa394..c6f3a4013c 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -1262,13 +1262,7 @@ <context> <name>RPCConsole</name> <message> - <location filename="../forms/debugwindow.ui" line="+46"/> - <source>Client name</source> - <translation>Client name</translation> - </message> - <message> - <location line="+10"/> - <location line="+23"/> + <location filename="../forms/debugwindow.ui" line="+56"/> <location line="+26"/> <location line="+26"/> <location line="+23"/> @@ -1305,7 +1299,7 @@ <translation>Client version</translation> </message> <message> - <location line="-45"/> + <location line="-22"/> <source>&Information</source> <translation>&Information</translation> </message> @@ -1320,7 +1314,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+79"/> + <location line="+56"/> <source>Using BerkeleyDB version</source> <translation type="unfinished"></translation> </message> @@ -1399,7 +1393,7 @@ <message> <location line="+60"/> <location filename="../rpcconsole.cpp" line="+295"/> - <location line="+635"/> + <location line="+634"/> <source>Select a peer to view detailed information.</source> <translation type="unfinished"></translation> </message> @@ -1550,7 +1544,7 @@ <translation>Clear console</translation> </message> <message> - <location filename="../rpcconsole.cpp" line="-204"/> + <location filename="../rpcconsole.cpp" line="-203"/> <source>&Disconnect Node</source> <translation type="unfinished"></translation> </message> @@ -1588,7 +1582,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+118"/> + <location line="+117"/> <source>Welcome to the %1 RPC console.</source> <translation type="unfinished"></translation> </message> @@ -2232,7 +2226,7 @@ <context> <name>bitcoin-core</name> <message> - <location filename="../bitcoinstrings.cpp" line="+298"/> + <location filename="../bitcoinstrings.cpp" line="+292"/> <source>Options:</source> <translation>Options:</translation> </message> @@ -2257,7 +2251,7 @@ <translation>Accept command line and JSON-RPC commands</translation> </message> <message> - <location line="-134"/> + <location line="-128"/> <source>If <category> is not supplied or if <category> = 1, output all debugging information.</source> <translation type="unfinished"></translation> </message> @@ -2282,7 +2276,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+125"/> + <location line="+119"/> <source>Error: A fatal internal error occurred, see debug.log for details</source> <translation type="unfinished"></translation> </message> @@ -2312,7 +2306,7 @@ <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation> </message> <message> - <location line="-212"/> + <location line="-206"/> <source>Bitcoin Core</source> <translation type="unfinished">Bitcoin Core</translation> </message> @@ -2423,16 +2417,6 @@ </message> <message> <location line="+12"/> - <source>WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> - <source>WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)</source> - <translation type="unfinished"></translation> - </message> - <message> - <location line="+3"/> <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source> <translation>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation> </message> @@ -2782,7 +2766,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="-328"/> + <location line="-322"/> <source>Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source> <translation type="unfinished"></translation> </message> @@ -2867,7 +2851,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+32"/> + <location line="+26"/> <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source> <translation type="unfinished"></translation> </message> @@ -3062,12 +3046,12 @@ <translation>Password for JSON-RPC connections</translation> </message> <message> - <location line="-224"/> + <location line="-218"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation> </message> <message> - <location line="+152"/> + <location line="+146"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation> </message> @@ -3077,7 +3061,7 @@ <translation>Loading addresses...</translation> </message> <message> - <location line="-270"/> + <location line="-264"/> <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source> <translation type="unfinished"></translation> </message> @@ -3157,7 +3141,7 @@ <translation type="unfinished"></translation> </message> <message> - <location line="+13"/> + <location line="+7"/> <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source> <translation type="unfinished"></translation> </message> diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts index 89653e7aaf..226444e9c5 100644 --- a/src/qt/locale/bitcoin_en_GB.ts +++ b/src/qt/locale/bitcoin_en_GB.ts @@ -1879,6 +1879,10 @@ <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>Unable to rewind the database to a pre-fork state. You will need to re-download the blockchain</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</translation> </message> @@ -2099,10 +2103,18 @@ <translation>Rebuild chain state from the currently indexed blocks</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>Rewinding blocks...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>Set database cache size in megabytes (%d to %d, default: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>Set maximum block cost (default: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>Set maximum block size in bytes (default: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts index fc430e86b3..80cbe39932 100644 --- a/src/qt/locale/bitcoin_es.ts +++ b/src/qt/locale/bitcoin_es.ts @@ -1878,6 +1878,10 @@ <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>No es posible reconstruir la base de datos a un estado anterior. Debe descargar de nuevo la cadena de bloques.</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>Utiliza UPnP para asignar el puerto de escucha (predeterminado: 1 cuando esta escuchando sin -proxy)</translation> </message> @@ -2098,10 +2102,18 @@ <translation>Reconstruir el estado de la cadena a partir de los bloques indexados</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>Verificando bloques...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>Establecer tamaño máximo de bloque (por defecto: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>Establecer tamaño máximo de bloque en bytes (predeterminado: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index fe745f99bf..5c4f7f2b04 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -1859,6 +1859,10 @@ <translation>Ceci est une pré-version de test - l'utiliser à vos risques et périls - ne pas l'utiliser pour miner ou pour des applications marchandes</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>Impossible de rebobiner la base de données à un état préfourche. Vous devrez retélécharger la chaîne de blocs</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 lors de l'écoute et pas de mandataire -proxy)</translation> </message> @@ -2071,10 +2075,18 @@ <translation>Reconstruire l'état de la chaîne à partir des blocs indexés actuellement</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>Rebobinage des blocs...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>Définir le coût maximal de bloc (par défaut : %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>Définir la taille minimale de bloc en octets (par défaut : %d)</translation> </message> @@ -2191,6 +2203,10 @@ <translation>Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL <https://www.openssl.org/> et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</translation> </message> <message> + <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source> + <translation>Utiliser une génération de clef hiérarchique déterministe (HD) après BIP32. N'a d'effet que lors de la création/premier lancement du porte-monnaie</translation> + </message> + <message> <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source> <translation>Les pairs de la liste blanche ne peuvent pas être bannis DoS et leurs transactions sont toujours relayées, même si elles sont déjà dans le mempool, utile p. ex. pour une passerelle</translation> </message> diff --git a/src/qt/locale/bitcoin_fr_FR.ts b/src/qt/locale/bitcoin_fr_FR.ts index f7fd7e6a18..08824e113a 100644 --- a/src/qt/locale/bitcoin_fr_FR.ts +++ b/src/qt/locale/bitcoin_fr_FR.ts @@ -255,6 +255,10 @@ <translation><numerusform>%n connexion active au réseau Bitcoin</numerusform><numerusform>%n connexions actives au réseau Bitcoin</numerusform></translation> </message> <message> + <source>Indexing blocks on disk...</source> + <translation>Indexation des blocs sur le disque...</translation> + </message> + <message> <source>No block source available...</source> <translation>Aucun bloc source disponible</translation> </message> @@ -307,6 +311,10 @@ <translation>À jour</translation> </message> <message> + <source>%1 client</source> + <translation>%1 client</translation> + </message> + <message> <source>Catching up...</source> <translation>Rattrapage...</translation> </message> @@ -512,6 +520,10 @@ <translation>Bienvenue </translation> </message> <message> + <source>Welcome to %1.</source> + <translation>Bienvenue sur %1.</translation> + </message> + <message> <source>Use the default data directory</source> <translation>Utiliser le répertoire par défaut </translation> </message> @@ -642,6 +654,14 @@ <translation>&Fenêtre</translation> </message> <message> + <source>&Hide the icon from the system tray.</source> + <translation>&Cacher l'icône dans la zone de notification.</translation> + </message> + <message> + <source>Hide tray icon</source> + <translation>Cacher l'icône de la zone de notification</translation> + </message> + <message> <source>&Minimize to the tray instead of the taskbar</source> <translation>&Minimiser dans la barre système au lieu de la barre des tâches</translation> </message> @@ -1327,6 +1347,10 @@ <translation>Fonctionner en arrière-plan en tant que démon et accepter les commandes</translation> </message> <message> + <source>Unable to start HTTP server. See debug log for details.</source> + <translation>Impossible de démarrer le serveur HTTP. Voir le journal de débogage pour plus de détails.</translation> + </message> + <message> <source>Bitcoin Core</source> <translation>Bitcoin Core</translation> </message> diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts index b2dae186d9..460a652e37 100644 --- a/src/qt/locale/bitcoin_ja.ts +++ b/src/qt/locale/bitcoin_ja.ts @@ -1879,6 +1879,10 @@ <translation>これはリリース前のテストビルドです - 各自の責任で利用すること - 採掘や商取引に使用しないでください</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>データベースをフォーク前の状態に巻き戻せませんでした。ブロックチェーンを再ダウンロードする必要があります</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>リスン ポートの割当に UPnP を使用 (初期値: リスン中および-proxyが指定されていない場合は1)</translation> </message> @@ -2100,10 +2104,18 @@ <translation>既にインデックスされたブロックからチェイン状態を再構築する</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>ブロックを巻き戻しています...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>データベースのキャッシュサイズをメガバイトで設定 (%dから%d。初期値: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>最大ブロックコストを設定 (初期値: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>最大ブロックサイズをバイトで設定 (初期値: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts index de4c32c2df..acfb38e418 100644 --- a/src/qt/locale/bitcoin_ms_MY.ts +++ b/src/qt/locale/bitcoin_ms_MY.ts @@ -18,6 +18,15 @@ <translation>&Salin</translation> </message> <message> + <source>Delete the currently selected address from the list</source> + <translation>Padam alamat semasa yang dipilih dari senaraiyang dipilih dari senarai</translation> + </message> + <message> + <source>Export the data in the current tab to a file</source> + <translation> +Alihkan fail data ke dalam tab semasa</translation> + </message> + <message> <source>&Export</source> <translation>&Eksport</translation> </message> diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts index 3009c154e3..2b0cded386 100644 --- a/src/qt/locale/bitcoin_nl.ts +++ b/src/qt/locale/bitcoin_nl.ts @@ -870,7 +870,7 @@ </message> <message> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source> - <translation>De weergegeven informatie kan verouderd zijn. Uw portemonnee synchroniseert automaticsh met het Bitcoinnetwerk nadat een verbinding is gelegd, maar dit proces is nog niet voltooid.</translation> + <translation>De weergegeven informatie kan verouderd zijn. Uw portemonnee synchroniseert automatisch met het Bitcoinnetwerk nadat een verbinding is gelegd, maar dit proces is nog niet voltooid.</translation> </message> <message> <source>Watch-only:</source> diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts index e2949a9482..750ea7db65 100644 --- a/src/qt/locale/bitcoin_ru.ts +++ b/src/qt/locale/bitcoin_ru.ts @@ -131,6 +131,10 @@ <translation>&Параметры</translation> </message> <message> + <source>Modify configuration options for %1</source> + <translation>Изменить конфигурационные настройки для %1</translation> + </message> + <message> <source>&Encrypt Wallet...</source> <translation>&Зашифровать бумажник...</translation> </message> @@ -552,7 +556,11 @@ <source>Show splash screen on startup (default: %u)</source> <translation>Показывать экран-заставку при запуске (по умолчанию: %u)</translation> </message> - </context> + <message> + <source>Reset all settings changed in the GUI</source> + <translation>Сбросить все настройки, измененные в графическом интерфейсе</translation> + </message> +</context> <context> <name>Intro</name> <message> @@ -564,6 +572,14 @@ <translation>Добро пожаловать в %1</translation> </message> <message> + <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source> + <translation>При первом запуске программы вы можете выбрать где %1 будет хранить свои данные.</translation> + </message> + <message> + <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source> + <translation>%1 скачает и сохранит копию цепи блоков. Как минимум %2GB будут записаны в этот каталог, и со временем он будет расти. Бумажник также будет сохранен в этом каталоге.</translation> + </message> + <message> <source>Use the default data directory</source> <translation>Использовать каталог данных по умолчанию</translation> </message> @@ -618,6 +634,14 @@ <translation>&Главная</translation> </message> <message> + <source>Automatically start %1 after logging in to the system.</source> + <translation>Автоматически запускать %1 после входа в систему.</translation> + </message> + <message> + <source>&Start %1 on system login</source> + <translation>&Запускать %1 при входе в систему</translation> + </message> + <message> <source>Size of &database cache</source> <translation>Размер кэша &БД</translation> </message> @@ -754,6 +778,10 @@ <translation>&Окно</translation> </message> <message> + <source>&Hide the icon from the system tray.</source> + <translation>&Скрыть иконку из системного трея.</translation> + </message> + <message> <source>Hide tray icon</source> <translation>Скрыть иконку в трее</translation> </message> @@ -778,6 +806,10 @@ <translation>&Язык интерфейса:</translation> </message> <message> + <source>The user interface language can be set here. This setting will take effect after restarting %1.</source> + <translation>Здесь можно установить язык пользовательского интерфейса. Настройки вступят в силу после перезагрузки %1</translation> + </message> + <message> <source>&Unit to show amounts in:</source> <translation>&Отображать суммы в единицах: </translation> </message> @@ -986,6 +1018,10 @@ <translation>Используется версия BerkeleyDB</translation> </message> <message> + <source>Datadir</source> + <translation>Каталог для данных</translation> + </message> + <message> <source>Startup time</source> <translation>Время запуска</translation> </message> @@ -1070,6 +1106,10 @@ <translation>Юзер-агент</translation> </message> <message> + <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source> + <translation>Открыть отладочный лог-файл %1 из текущего каталога данных. Это может занять несколько секунд для больших лог-файлов.</translation> + </message> + <message> <source>Services</source> <translation>Сервисы</translation> </message> diff --git a/src/qt/locale/bitcoin_ru_RU.ts b/src/qt/locale/bitcoin_ru_RU.ts index a6f9ffccbd..66419728e2 100644 --- a/src/qt/locale/bitcoin_ru_RU.ts +++ b/src/qt/locale/bitcoin_ru_RU.ts @@ -2,6 +2,10 @@ <context> <name>AddressBookPage</name> <message> + <source>Right-click to edit address or label</source> + <translation>Кликните правой кнопкой мыши для редоктирования адреса или ярлыка</translation> + </message> + <message> <source>Create a new address</source> <translation>Создать новый адрес</translation> </message> @@ -40,7 +44,11 @@ </context> <context> <name>AskPassphraseDialog</name> - </context> + <message> + <source>Repeat new passphrase</source> + <translation>Повторите новый пароль</translation> + </message> +</context> <context> <name>BanTableModel</name> </context> diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts index a637cebe2c..6361b5ea5f 100644 --- a/src/qt/locale/bitcoin_sv.ts +++ b/src/qt/locale/bitcoin_sv.ts @@ -1875,6 +1875,10 @@ <translation>Detta är ett förhands testbygge - använd på egen risk - använd inte för mining eller handels applikationer</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>Kan inte spola tillbaka databasen till obeskärt läge. Du måste ladda ner blockkedjan igen</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 1 när lyssning aktiverat och utan -proxy)</translation> </message> @@ -2095,10 +2099,18 @@ <translation>Återskapa blockkedjans status från aktuella indexerade block</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>Spolar tillbaka blocken...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>Sätt databasens cachestorlek i megabyte (%d till %d, förvalt: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>Sätt maximal blockkostnad (förvalt: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>Sätt maximal blockstorlek i byte (förvalt: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts index 2630939146..34c7526341 100644 --- a/src/qt/locale/bitcoin_th_TH.ts +++ b/src/qt/locale/bitcoin_th_TH.ts @@ -765,6 +765,30 @@ <source>Tor</source> <translation>Tor</translation> </message> + <message> + <source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services.</source> + <translation>เชื่อมต่อกับ เครือข่าย Bitcoin ผ่านทาง พร้อกซี่ SOCKS5 แยกต่างหาก สำหรับ Tor เซอร์วิส</translation> + </message> + <message> + <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source> + <translation>ใช้ พร็อกซี่ SOCKS5 แยก เพื่อเข้าถึง peers ผ่าน Tor เซอร์วิสซ่อน:</translation> + </message> + <message> + <source>&Window</source> + <translation>&วันโดว์</translation> + </message> + <message> + <source>&Hide the icon from the system tray.</source> + <translation>&ซ่อนไอคอน จากเทรย์ระบบ</translation> + </message> + <message> + <source>Hide tray icon</source> + <translation>ซ่อนไอคอนเทรย์</translation> + </message> + <message> + <source>Show only a tray icon after minimizing the window.</source> + <translation>แสดงเทรย์ไอคอน หลังมืนิไมส์วินโดว์ เท่านั้น</translation> + </message> </context> <context> <name>OverviewPage</name> diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts index cbdb8f2c0b..c71a37ba98 100644 --- a/src/qt/locale/bitcoin_zh_TW.ts +++ b/src/qt/locale/bitcoin_zh_TW.ts @@ -1880,6 +1880,10 @@ <translation>這是個還沒發表的測試版本 - 使用請自負風險 - 請不要用來開採或商業應用</translation> </message> <message> + <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> + <translation>沒辦法將資料庫倒轉回分岔前的狀態。必須要重新下載區塊鍊。</translation> + </message> + <message> <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source> <translation>是否要使用「通用即插即用」協定(UPnP),來設定聽候連線的通訊埠的對應(預設值: 當有聽候連線且沒有指定 -proxy 參數時為 1)</translation> </message> @@ -2100,10 +2104,18 @@ <translation>從目前已編索引的區塊資料重建區塊鏈狀態</translation> </message> <message> + <source>Rewinding blocks...</source> + <translation>倒轉回區塊鏈之前的狀態...</translation> + </message> + <message> <source>Set database cache size in megabytes (%d to %d, default: %d)</source> <translation>設定資料庫快取大小是多少百萬位元組(MB,範圍: %d 到 %d,預設值: %d)</translation> </message> <message> + <source>Set maximum block cost (default: %d)</source> + <translation>設定區塊成本的最大值(預設值: %d)</translation> + </message> + <message> <source>Set maximum block size in bytes (default: %d)</source> <translation>設定區塊大小上限成多少位元組(預設值: %d)</translation> </message> diff --git a/src/qt/res/bitcoin-qt-res.rc b/src/qt/res/bitcoin-qt-res.rc index 19c3d5d97d..94ae256477 100644 --- a/src/qt/res/bitcoin-qt-res.rc +++ b/src/qt/res/bitcoin-qt-res.rc @@ -1,4 +1,5 @@ IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico" +IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico" #include <windows.h> // needed for VERSIONINFO #include "../../clientversion.h" // holds the needed client version information diff --git a/src/qt/res/icons/bitcoin_testnet.ico b/src/qt/res/icons/bitcoin_testnet.ico Binary files differnew file mode 100644 index 0000000000..909194ecd2 --- /dev/null +++ b/src/qt/res/icons/bitcoin_testnet.ico diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 11f3e49a06..650ff8b00d 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -451,7 +451,6 @@ void RPCConsole::setClientModel(ClientModel *model) // Provide initial values ui->clientVersion->setText(model->formatFullVersion()); ui->clientUserAgent->setText(model->formatSubVersion()); - ui->clientName->setText(model->clientName()); ui->dataDir->setText(model->dataDir()); ui->startupTime->setText(model->formatClientStartupTime()); ui->networkName->setText(QString::fromStdString(Params().NetworkIDString())); diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp deleted file mode 100644 index 70f1f12273..0000000000 --- a/src/test/alert_tests.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2013-2015 The Bitcoin Core developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -// Unit tests for alert system - -#include "chainparams.h" -#include "main.h" // For PartitionCheck - -#include "test/testutil.h" -#include "test/test_bitcoin.h" - -#include <boost/test/unit_test.hpp> - -BOOST_FIXTURE_TEST_SUITE(Alert_tests, TestingSetup) - - -static bool falseFunc() { return false; } - -BOOST_AUTO_TEST_CASE(PartitionAlert) -{ - // Test PartitionCheck - CCriticalSection csDummy; - CBlockIndex indexDummy[100]; - CChainParams& params = Params(CBaseChainParams::MAIN); - int64_t nPowTargetSpacing = params.GetConsensus().nPowTargetSpacing; - - // Generate fake blockchain timestamps relative to - // an arbitrary time: - int64_t now = 1427379054; - SetMockTime(now); - for (int i = 0; i < 100; i++) - { - indexDummy[i].phashBlock = NULL; - if (i == 0) indexDummy[i].pprev = NULL; - else indexDummy[i].pprev = &indexDummy[i-1]; - indexDummy[i].nHeight = i; - indexDummy[i].nTime = now - (100-i)*nPowTargetSpacing; - // Other members don't matter, the partition check code doesn't - // use them - } - - strMiscWarning = ""; - - // Test 1: chain with blocks every nPowTargetSpacing seconds, - // as normal, no worries: - PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); - BOOST_CHECK_MESSAGE(strMiscWarning.empty(), strMiscWarning); - - // Test 2: go 3.5 hours without a block, expect a warning: - now += 3*60*60+30*60; - SetMockTime(now); - PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); - BOOST_CHECK(!strMiscWarning.empty()); - BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning); - strMiscWarning = ""; - - // Test 3: test the "partition alerts only go off once per day" - // code: - now += 60*10; - SetMockTime(now); - PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); - BOOST_CHECK(strMiscWarning.empty()); - - // Test 4: get 2.5 times as many blocks as expected: - now += 60*60*24; // Pretend it is a day later - SetMockTime(now); - int64_t quickSpacing = nPowTargetSpacing*2/5; - for (int i = 0; i < 100; i++) // Tweak chain timestamps: - indexDummy[i].nTime = now - (100-i)*quickSpacing; - PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); - BOOST_CHECK(!strMiscWarning.empty()); - BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning); - strMiscWarning = ""; - - SetMockTime(0); -} - -BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file diff --git a/src/txdb.h b/src/txdb.h index ce3c39d7fe..5b98d2792c 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -22,11 +22,19 @@ class CCoinsViewDBCursor; class uint256; //! -dbcache default (MiB) -static const int64_t nDefaultDbCache = 100; -//! max. -dbcache in (MiB) +static const int64_t nDefaultDbCache = 300; +//! max. -dbcache (MiB) static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 16384 : 1024; -//! min. -dbcache in (MiB) +//! min. -dbcache (MiB) static const int64_t nMinDbCache = 4; +//! Max memory allocated to block tree DB specific cache, if no -txindex (MiB) +static const int64_t nMaxBlockDBCache = 2; +//! Max memory allocated to block tree DB specific cache, if -txindex (MiB) +// Unlike for the UTXO database, for the txindex scenario the leveldb cache make +// a meaningful difference: https://github.com/bitcoin/bitcoin/pull/8273#issuecomment-229601991 +static const int64_t nMaxBlockDBAndTxIndexCache = 1024; +//! Max memory allocated to coin DB specific cache (MiB) +static const int64_t nMaxCoinsDBCache = 8; struct CDiskTxPos : public CDiskBlockPos { diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 0a4f06ba88..c6c5058984 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -349,20 +349,6 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset) BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet)); BOOST_CHECK_EQUAL(nValueRet, 1003 * COIN); BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); - - empty_wallet(); - - // Test trimming - for (int i = 0; i < 100; i++) - add_coin(10 * COIN); - for (int i = 0; i < 100; i++) - add_coin(1000 * COIN); - - BOOST_CHECK(wallet.SelectCoinsMinConf(100001 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet)); - // We need all 100 larger coins and exactly one small coin. - // Superfluous small coins must be trimmed from the set: - BOOST_CHECK_EQUAL(nValueRet, 100010 * COIN); - BOOST_CHECK_EQUAL(setCoinsRet.size(), 101); } BOOST_AUTO_TEST_SUITE_END() diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 87b85eeb72..a0095ebd92 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1879,16 +1879,6 @@ static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,uns } } } - - //Reduces the approximate best subset by removing any inputs that are smaller than the surplus of nTotal beyond nTargetValue. - for (unsigned int i = 0; i < vValue.size(); i++) - { - if (vfBest[i] && (nBest - vValue[i].first) >= nTargetValue ) - { - vfBest[i] = false; - nBest -= vValue[i].first; - } - } } bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins, |