diff options
55 files changed, 2301 insertions, 638 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47648cde22..fc8d58d97d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ fixes or code moves with actual code changes. Commit messages should be verbose by default consisting of a short subject line (50 chars max), a blank line and detailed explanatory text as separate paragraph(s); unless the title alone is self-explanatory (like "Corrected typo -in main.cpp") then a single title line is sufficient. Commit messages should be +in init.cpp") then a single title line is sufficient. Commit messages should be helpful to people reading your code in the future, so explain the reasoning for your decisions. Further explanation [here](http://chris.beams.io/posts/git-commit/). @@ -79,7 +79,7 @@ Examples: Consensus: Add new opcode for BIP-XXXX OP_CHECKAWESOMESIG Net: Automatically create hidden service, listen on Tor Qt: Add feed bump button - Trivial: Fix typo in main.cpp + Trivial: Fix typo in init.cpp If a pull request is specifically not to be considered for merging (yet) please prefix the title with [WIP] or use [Tasks Lists](https://help.github.com/articles/basic-writing-and-formatting-syntax/#task-lists) @@ -194,7 +194,7 @@ request. Typically reviewers will review the code for obvious errors, as well as test out the patch set and opine on the technical merits of the patch. Project maintainers take into account the peer review when determining if there is consensus to merge a pull request (remember that discussions may have been -spread out over github, mailing list and IRC discussions). The following +spread out over GitHub, mailing list and IRC discussions). The following language is used within pull-request comments: - ACK means "I have tested the code and I agree it should be merged"; diff --git a/configure.ac b/configure.ac index 346695043d..64a6234449 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) -define(_CLIENT_VERSION_MINOR, 13) +define(_CLIENT_VERSION_MINOR, 14) define(_CLIENT_VERSION_REVISION, 99) define(_CLIENT_VERSION_BUILD, 0) define(_CLIENT_VERSION_IS_RELEASE, false) diff --git a/contrib/README.md b/contrib/README.md index 4ea9700f59..6f750106e4 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -3,7 +3,7 @@ Repository Tools ### [Developer tools](/contrib/devtools) ### Specific tools for developers working on this repository. -Contains the script `github-merge.py` for merging github pull requests securely and signing them using GPG. +Contains the script `github-merge.py` for merging GitHub pull requests securely and signing them using GPG. ### [Verify-Commits](/contrib/verify-commits) ### Tool to verify that every merge commit was signed by a developer using the above `github-merge.py` script. diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index 34f2af6866..67c5e15a15 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -125,7 +125,7 @@ check or whatever). This means that there are no potential race conditions (where a pullreq gets updated while you're reviewing it, but before you click -merge), and when using GPG signatures, that even a compromised github +merge), and when using GPG signatures, that even a compromised GitHub couldn't mess with the sources. Setup diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py index 78b9f9d179..2011841005 100755 --- a/contrib/devtools/update-translations.py +++ b/contrib/devtools/update-translations.py @@ -65,6 +65,14 @@ def split_format_specifiers(specifiers): else: other.append(s) + # If both numeric format specifiers and "others" are used, assume we're dealing + # with a Qt-formatted message. In the case of Qt formatting (see https://doc.qt.io/qt-5/qstring.html#arg) + # only numeric formats are replaced at all. This means "(percentage: %1%)" is valid, without needing + # any kind of escaping that would be necessary for strprintf. Without this, this function + # would wrongly detect '%)' as a printf format specifier. + if numeric: + other = [] + # numeric (Qt) can be present in any order, others (strprintf) must be in specified order return set(numeric),other diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 6f43119ba2..00af4bdc6f 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -1,5 +1,5 @@ --- -name: "bitcoin-linux-0.13" +name: "bitcoin-linux-0.15" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index 991976d59e..05cc65414f 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -1,5 +1,5 @@ --- -name: "bitcoin-osx-0.13" +name: "bitcoin-osx-0.15" enable_cache: true suites: - "trusty" diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index fe01b5b957..6fead7c208 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -1,5 +1,5 @@ --- -name: "bitcoin-win-0.13" +name: "bitcoin-win-0.15" enable_cache: true suites: - "trusty" diff --git a/doc/Doxyfile b/doc/Doxyfile index ef55acdbc3..45436a6b15 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "Bitcoin Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.99 +PROJECT_NUMBER = 0.14.99 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/doc/README.md b/doc/README.md index 36684e5401..09f32bc09e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.99 +Bitcoin Core 0.14.99 ===================== Setup diff --git a/doc/README_windows.txt b/doc/README_windows.txt index 74a05138a4..0e4c9ce04f 100644 --- a/doc/README_windows.txt +++ b/doc/README_windows.txt @@ -1,4 +1,4 @@ -Bitcoin Core 0.13.99
+Bitcoin Core 0.14.99
=====================
Intro
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 989ad8d03e..3a7e4f73b3 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -448,7 +448,7 @@ Current subtrees include: - Upstream at https://github.com/jgarzik/univalue ; report important PRs to Core to avoid delay. -Git and github tips +Git and GitHub tips --------------------- - For resolving merge/rebase conflicts, it can be useful to enable diff3 style using diff --git a/doc/release-notes.md b/doc/release-notes.md index 0ea9e1949e..eaa0b330eb 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -33,117 +33,6 @@ frequently tested on them. Notable changes =============== -Low-level RPC changes ----------------------- - -- `importprunedfunds` only accepts two required arguments. Some versions accept - an optional third arg, which was always ignored. Make sure to never pass more - than two arguments. - -Fee Estimation Changes ----------------------- - -- Since 0.13.2 fee estimation for a confirmation target of 1 block has been - disabled. This is only a minor behavior change as there was often insufficient - data for this target anyway. `estimatefee 1` will now always return -1 and - `estimatesmartfee 1` will start searching at a target of 2. - -- The default target for fee estimation is changed to 6 blocks in both the GUI - (previously 25) and for RPC calls (previously 2). - -Removal of Priority Estimation -------------------------------- - -- Estimation of "priority" needed for a transaction to be included within a target - number of blocks has been removed. The rpc calls are deprecated and will either - return -1 or 1e24 appropriately. The format for `fee_estimates.dat` has also - changed to no longer save these priority estimates. It will automatically be - converted to the new format which is not readable by prior versions of the - software. - -- The concept of "priority" (coin age) transactions is planned to be removed in - the next major version. To prepare for this, the default for the rate limit of - priority transactions (`-limitfreerelay`) has been set to `0` kB/minute. This - is not to be confused with the `prioritisetransaction` RPC which will remain - supported for adding fee deltas to transactions. - -P2P connection management --------------------------- - -- Peers manually added through the addnode option or addnode RPC now have their own - limit of eight connections which does not compete with other inbound or outbound - connection usage and is not subject to the maxconnections limitation. - -- New connections to manually added peers are much faster. - -Introduction of assumed-valid blocks -------------------------------------- - -- A significant portion of the initial block download time is spent verifying - scripts/signatures. Although the verification must pass to ensure the security - of the system, no other result from this verification is needed: If the node - knew the history of a given block were valid it could skip checking scripts - for its ancestors. - -- A new configuration option 'assumevalid' is provided to express this knowledge - to the software. Unlike the 'checkpoints' in the past this setting does not - force the use of a particular chain: chains that are consistent with it are - processed quicker, but other chains are still accepted if they'd otherwise - be chosen as best. Also unlike 'checkpoints' the user can configure which - block history is assumed true, this means that even outdated software can - sync more quickly if the setting is updated by the user. - -- Because the validity of a chain history is a simple objective fact it is much - easier to review this setting. As a result the software ships with a default - value adjusted to match the current chain shortly before release. The use - of this default value can be disabled by setting -assumevalid=0 - -0.14.0 Change log -================= - -Detailed release notes follow. This overview includes changes that affect -behavior, not code moves, refactors and string updates. For convenience in locating -the code changes and accompanying discussion, both the pull request and -git merge commit are mentioned. - -### RPC and REST - -UTXO set query (`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`) responses -were changed to return status code HTTP_BAD_REQUEST (400) instead of HTTP_INTERNAL_SERVER_ERROR (500) when requests -contain invalid parameters. - -The first boolean argument to `getaddednodeinfo` has been removed. This is an incompatible change. - -Call "getmininginfo" loses the "testnet" field in favor of the more generic "chain" (which has been present for years). - -### Configuration and command-line options - -### Block and transaction handling - -### P2P protocol and network code - -### Validation - -### Build system - -### Wallet - -0.14.0 Fundrawtransaction change address reuse -============================================== - -Before 0.14, `fundrawtransaction` was by default wallet stateless. In almost all cases `fundrawtransaction` does add a change-output to the outputs of the funded transaction. Before 0.14, the used keypool key was never marked as change-address key and directly returned to the keypool (leading to address reuse). -Before 0.14, calling `getnewaddress` directly after `fundrawtransaction` did generate the same address as the change-output address. - -Since 0.14, fundrawtransaction does reserve the change-output-key from the keypool by default (optional by setting `reserveChangeKey`, default = `true`) - -Users should also consider using `getrawchangeaddress()` in conjunction with `fundrawtransaction`'s `changeAddress` option. - -### GUI - -### Tests - -### Miscellaneous - Credits ======= diff --git a/doc/translation_process.md b/doc/translation_process.md index 9e9ced2457..1702637d53 100644 --- a/doc/translation_process.md +++ b/doc/translation_process.md @@ -4,7 +4,7 @@ Translations The Bitcoin-Core project has been designed to support multiple localisations. This makes adding new phrases, and completely new languages easily achievable. For managing all application translations, Bitcoin-Core makes use of the Transifex online translation management tool. ### Helping to translate (using Transifex) -Transifex is setup to monitor the Github repo for updates, and when code containing new translations is found, Transifex will process any changes. It may take several hours after a pull-request has been merged, to appear in the Transifex web interface. +Transifex is setup to monitor the GitHub repo for updates, and when code containing new translations is found, Transifex will process any changes. It may take several hours after a pull-request has been merged, to appear in the Transifex web interface. Multiple language support is critical in assisting Bitcoin’s global adoption, and growth. One of Bitcoin’s greatest strengths is cross-border money transfers, any help making that easier is greatly appreciated. @@ -32,7 +32,7 @@ QToolBar *toolbar = addToolBar(tr("Tabs toolbar")); ### Creating a pull-request For general PRs, you shouldn’t include any updates to the translation source files. They will be updated periodically, primarily around pre-releases, allowing time for any new phrases to be translated before public releases. This is also important in avoiding translation related merge conflicts. -When an updated source file is merged into the Github repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators. +When an updated source file is merged into the GitHub repo, Transifex will automatically detect it (although it can take several hours). Once processed, the new strings will show up as "Remaining" in the Transifex web interface and are ready for translators. To create the pull-request, use the following commands: ``` diff --git a/doc/zmq.md b/doc/zmq.md index 6079e3254f..1019ff6653 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -1,4 +1,4 @@ -# Block and Transaction Broadcasting With ZeroMQ +# Block and Transaction Broadcasting with ZeroMQ [ZeroMQ](http://zeromq.org/) is a lightweight wrapper around TCP connections, inter-process communication, and shared-memory, @@ -50,7 +50,7 @@ during the *configure* step of building bitcoind: $ ./configure --disable-zmq (other options) To actually enable operation, one must set the appropriate options on -the commandline or in the configuration file. +the command line or in the configuration file. ## Usage diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index 26bc6a73df..20ab0fdd1d 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -154,6 +154,7 @@ testScripts = [ 'bumpfee.py', 'rpcnamedargs.py', 'listsinceblock.py', + 'p2p-leaktests.py', ] if ENABLE_ZMQ: testScripts.append('zmq_test.py') @@ -168,6 +169,7 @@ testScriptsExt = [ # vv Tests less than 2m vv 'bip68-sequence.py', 'getblocktemplate_longpoll.py', + 'p2p-timeouts.py', # vv Tests less than 60s vv 'bip9-softforks.py', 'p2p-feefilter.py', diff --git a/qa/rpc-tests/import-rescan.py b/qa/rpc-tests/import-rescan.py index e683df26db..54cc6d2642 100755 --- a/qa/rpc-tests/import-rescan.py +++ b/qa/rpc-tests/import-rescan.py @@ -2,54 +2,105 @@ # Copyright (c) 2014-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. - +"""Test rescan behavior of importaddress, importpubkey, importprivkey, and +importmulti RPCs with different types of keys and rescan options. + +In the first part of the test, node 0 creates an address for each type of +import RPC call and sends BTC to it. Then other nodes import the addresses, +and the test makes listtransactions and getbalance calls to confirm that the +importing node either did or did not execute rescans picking up the send +transactions. + +In the second part of the test, node 0 sends more BTC to each address, and the +test makes more listtransactions and getbalance calls to confirm that the +importing nodes pick up the new transactions regardless of whether rescans +happened previously. +""" + +from test_framework.authproxy import JSONRPCException from test_framework.test_framework import BitcoinTestFramework -from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal) +from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal, set_node_times) from decimal import Decimal import collections import enum import itertools -import functools Call = enum.Enum("Call", "single multi") Data = enum.Enum("Data", "address pub priv") -ImportNode = collections.namedtuple("ImportNode", "rescan") - - -def call_import_rpc(call, data, address, scriptPubKey, pubkey, key, label, node, rescan): - """Helper that calls a wallet import RPC on a bitcoin node.""" - watchonly = data != Data.priv - if call == Call.single: - if data == Data.address: - response = node.importaddress(address, label, rescan) - elif data == Data.pub: - response = node.importpubkey(pubkey, label, rescan) - elif data == Data.priv: - response = node.importprivkey(key, label, rescan) - assert_equal(response, None) - elif call == Call.multi: - response = node.importmulti([{ - "scriptPubKey": { - "address": address - }, - "pubkeys": [pubkey] if data == Data.pub else [], - "keys": [key] if data == Data.priv else [], - "label": label, - "watchonly": watchonly - }], {"rescan": rescan}) - assert_equal(response, [{"success": True}]) - return watchonly - - -# List of RPCs that import a wallet key or address in various ways. -IMPORT_RPCS = [functools.partial(call_import_rpc, call, data) for call, data in itertools.product(Call, Data)] - -# List of bitcoind nodes that will import keys. -IMPORT_NODES = [ - ImportNode(rescan=True), - ImportNode(rescan=False), -] +Rescan = enum.Enum("Rescan", "no yes late_timestamp") + + +class Variant(collections.namedtuple("Variant", "call data rescan prune")): + """Helper for importing one key and verifying scanned transactions.""" + + def do_import(self, timestamp): + """Call one key import RPC.""" + + if self.call == Call.single: + if self.data == Data.address: + response, error = try_rpc(self.node.importaddress, self.address["address"], self.label, + self.rescan == Rescan.yes) + elif self.data == Data.pub: + response, error = try_rpc(self.node.importpubkey, self.address["pubkey"], self.label, + self.rescan == Rescan.yes) + elif self.data == Data.priv: + response, error = try_rpc(self.node.importprivkey, self.key, self.label, self.rescan == Rescan.yes) + assert_equal(response, None) + assert_equal(error, {'message': 'Rescan is disabled in pruned mode', + 'code': -4} if self.expect_disabled else None) + elif self.call == Call.multi: + response = self.node.importmulti([{ + "scriptPubKey": { + "address": self.address["address"] + }, + "timestamp": timestamp + RESCAN_WINDOW + (1 if self.rescan == Rescan.late_timestamp else 0), + "pubkeys": [self.address["pubkey"]] if self.data == Data.pub else [], + "keys": [self.key] if self.data == Data.priv else [], + "label": self.label, + "watchonly": self.data != Data.priv + }], {"rescan": self.rescan in (Rescan.yes, Rescan.late_timestamp)}) + assert_equal(response, [{"success": True}]) + + def check(self, txid=None, amount=None, confirmations=None): + """Verify that getbalance/listtransactions return expected values.""" + + balance = self.node.getbalance(self.label, 0, True) + assert_equal(balance, self.expected_balance) + + txs = self.node.listtransactions(self.label, 10000, 0, True) + assert_equal(len(txs), self.expected_txs) + + if txid is not None: + tx, = [tx for tx in txs if tx["txid"] == txid] + assert_equal(tx["account"], self.label) + assert_equal(tx["address"], self.address["address"]) + assert_equal(tx["amount"], amount) + assert_equal(tx["category"], "receive") + assert_equal(tx["label"], self.label) + assert_equal(tx["txid"], txid) + assert_equal(tx["confirmations"], confirmations) + assert_equal("trusted" not in tx, True) + if self.data != Data.priv: + assert_equal(tx["involvesWatchonly"], True) + else: + assert_equal("involvesWatchonly" not in tx, True) + + +# List of Variants for each way a key or address could be imported. +IMPORT_VARIANTS = [Variant(*variants) for variants in itertools.product(Call, Data, Rescan, (False, True))] + +# List of nodes to import keys to. Half the nodes will have pruning disabled, +# half will have it enabled. Different nodes will be used for imports that are +# expected to cause rescans, and imports that are not expected to cause +# rescans, in order to prevent rescans during later imports picking up +# transactions associated with earlier imports. This makes it easier to keep +# track of expected balances and transactions. +ImportNode = collections.namedtuple("ImportNode", "prune rescan") +IMPORT_NODES = [ImportNode(*fields) for fields in itertools.product((False, True), repeat=2)] + +# Rescans start at the earliest block up to 2 hours before the key timestamp. +RESCAN_WINDOW = 2 * 60 * 60 class ImportRescanTest(BitcoinTestFramework): @@ -59,6 +110,10 @@ class ImportRescanTest(BitcoinTestFramework): def setup_network(self): extra_args = [["-debug=1"] for _ in range(self.num_nodes)] + for i, import_node in enumerate(IMPORT_NODES, 1): + if import_node.prune: + extra_args[i] += ["-prune=1"] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) for i in range(1, self.num_nodes): connect_nodes(self.nodes[i], 0) @@ -66,89 +121,64 @@ class ImportRescanTest(BitcoinTestFramework): def run_test(self): # Create one transaction on node 0 with a unique amount and label for # each possible type of wallet import RPC. - import_rpc_variants = [] - for i, import_rpc in enumerate(IMPORT_RPCS): - label = "label{}".format(i) - addr = self.nodes[0].validateaddress(self.nodes[0].getnewaddress(label)) - key = self.nodes[0].dumpprivkey(addr["address"]) - amount = 24.9375 - i * .0625 - txid = self.nodes[0].sendtoaddress(addr["address"], amount) - import_rpc = functools.partial(import_rpc, addr["address"], addr["scriptPubKey"], addr["pubkey"], key, - label) - import_rpc_variants.append((import_rpc, label, amount, txid, addr)) - + for i, variant in enumerate(IMPORT_VARIANTS): + variant.label = "label {} {}".format(i, variant) + variant.address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress(variant.label)) + variant.key = self.nodes[0].dumpprivkey(variant.address["address"]) + variant.initial_amount = 25 - (i + 1) / 4.0 + variant.initial_txid = self.nodes[0].sendtoaddress(variant.address["address"], variant.initial_amount) + + # Generate a block containing the initial transactions, then another + # block further in the future (past the rescan window). self.nodes[0].generate(1) assert_equal(self.nodes[0].getrawmempool(), []) + timestamp = self.nodes[0].getblockheader(self.nodes[0].getbestblockhash())["time"] + set_node_times(self.nodes, timestamp + RESCAN_WINDOW + 1) + self.nodes[0].generate(1) sync_blocks(self.nodes) - # For each importing node and variation of wallet import RPC, invoke - # the RPC and check the results from getbalance and listtransactions. - for node, import_node in zip(self.nodes[1:], IMPORT_NODES): - for import_rpc, label, amount, txid, addr in import_rpc_variants: - watchonly = import_rpc(node, import_node.rescan) - - balance = node.getbalance(label, 0, True) - if import_node.rescan: - assert_equal(balance, amount) - else: - assert_equal(balance, 0) - - txs = node.listtransactions(label, 10000, 0, True) - if import_node.rescan: - assert_equal(len(txs), 1) - assert_equal(txs[0]["account"], label) - assert_equal(txs[0]["address"], addr["address"]) - assert_equal(txs[0]["amount"], amount) - assert_equal(txs[0]["category"], "receive") - assert_equal(txs[0]["label"], label) - assert_equal(txs[0]["txid"], txid) - assert_equal(txs[0]["confirmations"], 1) - assert_equal("trusted" not in txs[0], True) - if watchonly: - assert_equal(txs[0]["involvesWatchonly"], True) - else: - assert_equal("involvesWatchonly" not in txs[0], True) - else: - assert_equal(len(txs), 0) - - # Create spends for all the imported addresses. - spend_txids = [] + # For each variation of wallet key import, invoke the import RPC and + # check the results from getbalance and listtransactions. + for variant in IMPORT_VARIANTS: + variant.expect_disabled = variant.rescan == Rescan.yes and variant.prune and variant.call == Call.single + expect_rescan = variant.rescan == Rescan.yes and not variant.expect_disabled + variant.node = self.nodes[1 + IMPORT_NODES.index(ImportNode(variant.prune, expect_rescan))] + variant.do_import(timestamp) + if expect_rescan: + variant.expected_balance = variant.initial_amount + variant.expected_txs = 1 + variant.check(variant.initial_txid, variant.initial_amount, 2) + else: + variant.expected_balance = 0 + variant.expected_txs = 0 + variant.check() + + # Create new transactions sending to each address. fee = self.nodes[0].getnetworkinfo()["relayfee"] - for import_rpc, label, amount, txid, addr in import_rpc_variants: - raw_tx = self.nodes[0].getrawtransaction(txid) - decoded_tx = self.nodes[0].decoderawtransaction(raw_tx) - input_vout = next(out["n"] for out in decoded_tx["vout"] - if out["scriptPubKey"]["addresses"] == [addr["address"]]) - inputs = [{"txid": txid, "vout": input_vout}] - outputs = {self.nodes[0].getnewaddress(): Decimal(amount) - fee} - raw_spend_tx = self.nodes[0].createrawtransaction(inputs, outputs) - signed_spend_tx = self.nodes[0].signrawtransaction(raw_spend_tx) - spend_txid = self.nodes[0].sendrawtransaction(signed_spend_tx["hex"]) - spend_txids.append(spend_txid) + for i, variant in enumerate(IMPORT_VARIANTS): + variant.sent_amount = 25 - (2 * i + 1) / 8.0 + variant.sent_txid = self.nodes[0].sendtoaddress(variant.address["address"], variant.sent_amount) + # Generate a block containing the new transactions. self.nodes[0].generate(1) assert_equal(self.nodes[0].getrawmempool(), []) sync_blocks(self.nodes) - # Check the results from getbalance and listtransactions after the spends. - for node, import_node in zip(self.nodes[1:], IMPORT_NODES): - txs = node.listtransactions("*", 10000, 0, True) - for (import_rpc, label, amount, txid, addr), spend_txid in zip(import_rpc_variants, spend_txids): - balance = node.getbalance(label, 0, True) - spend_tx = [tx for tx in txs if tx["txid"] == spend_txid] - if import_node.rescan: - assert_equal(balance, amount) - assert_equal(len(spend_tx), 1) - assert_equal(spend_tx[0]["account"], "") - assert_equal(spend_tx[0]["amount"] + spend_tx[0]["fee"], -amount) - assert_equal(spend_tx[0]["category"], "send") - assert_equal("label" not in spend_tx[0], True) - assert_equal(spend_tx[0]["confirmations"], 1) - assert_equal("trusted" not in spend_tx[0], True) - assert_equal("involvesWatchonly" not in txs[0], True) - else: - assert_equal(balance, 0) - assert_equal(spend_tx, []) + # Check the latest results from getbalance and listtransactions. + for variant in IMPORT_VARIANTS: + if not variant.expect_disabled: + variant.expected_balance += variant.sent_amount + variant.expected_txs += 1 + variant.check(variant.sent_txid, variant.sent_amount, 1) + else: + variant.check() + + +def try_rpc(func, *args, **kwargs): + try: + return func(*args, **kwargs), None + except JSONRPCException as e: + return None, e.error if __name__ == "__main__": diff --git a/qa/rpc-tests/importmulti.py b/qa/rpc-tests/importmulti.py index e100a3af9d..1aa4ba2e18 100755 --- a/qa/rpc-tests/importmulti.py +++ b/qa/rpc-tests/importmulti.py @@ -20,6 +20,7 @@ class ImportMultiTest (BitcoinTestFramework): print ("Mining blocks...") self.nodes[0].generate(1) self.nodes[1].generate(1) + timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] # keyword definition PRIV_KEY = 'privkey' @@ -52,31 +53,48 @@ class ImportMultiTest (BitcoinTestFramework): result = self.nodes[1].importmulti([{ "scriptPubKey": { "address": address['address'] - } + }, + "timestamp": "now", }]) assert_equal(result[0]['success'], True) address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], True) assert_equal(address_assert['ismine'], False) + assert_equal(address_assert['timestamp'], timestamp) + watchonly_address = address['address'] + watchonly_timestamp = timestamp + print("Should not import an invalid address") + result = self.nodes[1].importmulti([{ + "scriptPubKey": { + "address": "not valid address", + }, + "timestamp": "now", + }]) + assert_equal(result[0]['success'], False) + assert_equal(result[0]['error']['code'], -5) + assert_equal(result[0]['error']['message'], 'Invalid address') # ScriptPubKey + internal print("Should import a scriptPubKey with internal flag") address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "internal": True }]) assert_equal(result[0]['success'], True) address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], True) assert_equal(address_assert['ismine'], False) + assert_equal(address_assert['timestamp'], timestamp) # ScriptPubKey + !internal print("Should not import a scriptPubKey without internal flag") address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ - "scriptPubKey": address['scriptPubKey'] + "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", }]) assert_equal(result[0]['success'], False) assert_equal(result[0]['error']['code'], -8) @@ -84,6 +102,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # Address + Public key + !Internal @@ -93,12 +112,14 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": address['address'] }, + "timestamp": "now", "pubkeys": [ address['pubkey'] ] }]) assert_equal(result[0]['success'], True) address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], True) assert_equal(address_assert['ismine'], False) + assert_equal(address_assert['timestamp'], timestamp) # ScriptPubKey + Public key + internal @@ -106,6 +127,7 @@ class ImportMultiTest (BitcoinTestFramework): address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) request = [{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "pubkeys": [ address['pubkey'] ], "internal": True }] @@ -114,12 +136,14 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], True) assert_equal(address_assert['ismine'], False) + assert_equal(address_assert['timestamp'], timestamp) # ScriptPubKey + Public key + !internal print("Should not import a scriptPubKey without internal and with public key") address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) request = [{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "pubkeys": [ address['pubkey'] ] }] result = self.nodes[1].importmulti(request) @@ -129,6 +153,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # Address + Private key + !watchonly print("Should import an address with private key") @@ -137,12 +162,14 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": address['address'] }, + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address['address']) ] }]) assert_equal(result[0]['success'], True) address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], True) + assert_equal(address_assert['timestamp'], timestamp) # Address + Private key + watchonly print("Should not import an address with private key and with watchonly") @@ -151,6 +178,7 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": address['address'] }, + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address['address']) ], "watchonly": True }]) @@ -160,12 +188,14 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # ScriptPubKey + Private key + internal print("Should import a scriptPubKey with internal and with private key") address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address['address']) ], "internal": True }]) @@ -173,12 +203,14 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], True) + assert_equal(address_assert['timestamp'], timestamp) # ScriptPubKey + Private key + !internal print("Should not import a scriptPubKey without internal and with private key") address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address['address']) ] }]) assert_equal(result[0]['success'], False) @@ -187,6 +219,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # P2SH address @@ -197,18 +230,21 @@ class ImportMultiTest (BitcoinTestFramework): self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) + timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] transaction = self.nodes[1].gettransaction(transactionid) print("Should import a p2sh") result = self.nodes[1].importmulti([{ "scriptPubKey": { "address": multi_sig_script['address'] - } + }, + "timestamp": "now", }]) assert_equal(result[0]['success'], True) address_assert = self.nodes[1].validateaddress(multi_sig_script['address']) assert_equal(address_assert['isscript'], True) assert_equal(address_assert['iswatchonly'], True) + assert_equal(address_assert['timestamp'], timestamp) p2shunspent = self.nodes[1].listunspent(0,999999, [multi_sig_script['address']])[0] assert_equal(p2shunspent['spendable'], False) assert_equal(p2shunspent['solvable'], False) @@ -222,6 +258,7 @@ class ImportMultiTest (BitcoinTestFramework): self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) + timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] transaction = self.nodes[1].gettransaction(transactionid) print("Should import a p2sh with respective redeem script") @@ -229,9 +266,12 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": multi_sig_script['address'] }, + "timestamp": "now", "redeemscript": multi_sig_script['redeemScript'] }]) assert_equal(result[0]['success'], True) + address_assert = self.nodes[1].validateaddress(multi_sig_script['address']) + assert_equal(address_assert['timestamp'], timestamp) p2shunspent = self.nodes[1].listunspent(0,999999, [multi_sig_script['address']])[0] assert_equal(p2shunspent['spendable'], False) @@ -246,6 +286,7 @@ class ImportMultiTest (BitcoinTestFramework): self.nodes[1].generate(100) transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00) self.nodes[1].generate(1) + timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['mediantime'] transaction = self.nodes[1].gettransaction(transactionid) print("Should import a p2sh with respective redeem script and private keys") @@ -253,10 +294,13 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": multi_sig_script['address'] }, + "timestamp": "now", "redeemscript": multi_sig_script['redeemScript'], "keys": [ self.nodes[0].dumpprivkey(sig_address_1['address']), self.nodes[0].dumpprivkey(sig_address_2['address'])] }]) assert_equal(result[0]['success'], True) + address_assert = self.nodes[1].validateaddress(multi_sig_script['address']) + assert_equal(address_assert['timestamp'], timestamp) p2shunspent = self.nodes[1].listunspent(0,999999, [multi_sig_script['address']])[0] assert_equal(p2shunspent['spendable'], False) @@ -277,6 +321,7 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": multi_sig_script['address'] }, + "timestamp": "now", "redeemscript": multi_sig_script['redeemScript'], "keys": [ self.nodes[0].dumpprivkey(sig_address_1['address']), self.nodes[0].dumpprivkey(sig_address_2['address'])], "watchonly": True @@ -294,6 +339,7 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": address['address'] }, + "timestamp": "now", "pubkeys": [ address2['pubkey'] ] }]) assert_equal(result[0]['success'], False) @@ -302,6 +348,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # ScriptPubKey + Public key + internal + Wrong pubkey @@ -310,6 +357,7 @@ class ImportMultiTest (BitcoinTestFramework): address2 = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) request = [{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "pubkeys": [ address2['pubkey'] ], "internal": True }] @@ -320,6 +368,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # Address + Private key + !watchonly + Wrong private key @@ -330,6 +379,7 @@ class ImportMultiTest (BitcoinTestFramework): "scriptPubKey": { "address": address['address'] }, + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address2['address']) ] }]) assert_equal(result[0]['success'], False) @@ -338,6 +388,7 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) # ScriptPubKey + Private key + internal + Wrong private key @@ -346,6 +397,7 @@ class ImportMultiTest (BitcoinTestFramework): address2 = self.nodes[0].validateaddress(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": address['scriptPubKey'], + "timestamp": "now", "keys": [ self.nodes[0].dumpprivkey(address2['address']) ], "internal": True }]) @@ -355,6 +407,28 @@ class ImportMultiTest (BitcoinTestFramework): address_assert = self.nodes[1].validateaddress(address['address']) assert_equal(address_assert['iswatchonly'], False) assert_equal(address_assert['ismine'], False) + assert_equal('timestamp' in address_assert, False) + + # restart nodes to check for proper serialization/deserialization of watch only address + stop_nodes(self.nodes) + self.nodes = start_nodes(2, self.options.tmpdir) + address_assert = self.nodes[1].validateaddress(watchonly_address) + assert_equal(address_assert['iswatchonly'], True) + assert_equal(address_assert['ismine'], False) + assert_equal(address_assert['timestamp'], watchonly_timestamp); + + # Bad or missing timestamps + print("Should throw on invalid or missing timestamp values") + assert_raises_message(JSONRPCException, 'Missing required timestamp field for key', + self.nodes[1].importmulti, [{ + "scriptPubKey": address['scriptPubKey'], + }]) + assert_raises_message(JSONRPCException, 'Expected number or "now" timestamp value for key. got type string', + self.nodes[1].importmulti, [{ + "scriptPubKey": address['scriptPubKey'], + "timestamp": "", + }]) + if __name__ == '__main__': ImportMultiTest ().main () diff --git a/qa/rpc-tests/p2p-fullblocktest.py b/qa/rpc-tests/p2p-fullblocktest.py index e4b889d761..44e5f10322 100755 --- a/qa/rpc-tests/p2p-fullblocktest.py +++ b/qa/rpc-tests/p2p-fullblocktest.py @@ -398,7 +398,7 @@ class FullBlockTest(ComparisonTestFramework): # Extend the b26 chain to make sure bitcoind isn't accepting b26 b27 = block(27, spend=out[7]) - yield rejected(RejectResult(16, b'bad-prevblk')) + yield rejected(RejectResult(0, b'bad-prevblk')) # Now try a too-large-coinbase script tip(15) @@ -410,7 +410,7 @@ class FullBlockTest(ComparisonTestFramework): # Extend the b28 chain to make sure bitcoind isn't accepting b28 b29 = block(29, spend=out[7]) - yield rejected(RejectResult(16, b'bad-prevblk')) + yield rejected(RejectResult(0, b'bad-prevblk')) # b30 has a max-sized coinbase scriptSig. tip(23) diff --git a/qa/rpc-tests/p2p-leaktests.py b/qa/rpc-tests/p2p-leaktests.py new file mode 100755 index 0000000000..41ca84d779 --- /dev/null +++ b/qa/rpc-tests/p2p-leaktests.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +# Copyright (c) 2017 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.mininode import * +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * + +''' +Test for message sending before handshake completion + +A node should never send anything other than VERSION/VERACK/REJECT until it's +received a VERACK. + +This test connects to a node and sends it a few messages, trying to intice it +into sending us something it shouldn't. +''' + +banscore = 10 + +class CLazyNode(NodeConnCB): + def __init__(self): + self.connection = None + self.unexpected_msg = False + self.connected = False + super().__init__() + + def add_connection(self, conn): + self.connection = conn + + def send_message(self, message): + self.connection.send_message(message) + + def bad_message(self, message): + self.unexpected_msg = True + print("should not have received message: %s" % message.command) + + def on_open(self, conn): + self.connected = True + + def on_version(self, conn, message): self.bad_message(message) + def on_verack(self, conn, message): self.bad_message(message) + def on_reject(self, conn, message): self.bad_message(message) + def on_inv(self, conn, message): self.bad_message(message) + def on_addr(self, conn, message): self.bad_message(message) + def on_alert(self, conn, message): self.bad_message(message) + def on_getdata(self, conn, message): self.bad_message(message) + def on_getblocks(self, conn, message): self.bad_message(message) + def on_tx(self, conn, message): self.bad_message(message) + def on_block(self, conn, message): self.bad_message(message) + def on_getaddr(self, conn, message): self.bad_message(message) + def on_headers(self, conn, message): self.bad_message(message) + def on_getheaders(self, conn, message): self.bad_message(message) + def on_ping(self, conn, message): self.bad_message(message) + def on_mempool(self, conn): self.bad_message(message) + def on_pong(self, conn, message): self.bad_message(message) + def on_feefilter(self, conn, message): self.bad_message(message) + def on_sendheaders(self, conn, message): self.bad_message(message) + def on_sendcmpct(self, conn, message): self.bad_message(message) + def on_cmpctblock(self, conn, message): self.bad_message(message) + def on_getblocktxn(self, conn, message): self.bad_message(message) + def on_blocktxn(self, conn, message): self.bad_message(message) + +# Node that never sends a version. We'll use this to send a bunch of messages +# anyway, and eventually get disconnected. +class CNodeNoVersionBan(CLazyNode): + def __init__(self): + super().__init__() + + # send a bunch of veracks without sending a message. This should get us disconnected. + # NOTE: implementation-specific check here. Remove if bitcoind ban behavior changes + def on_open(self, conn): + super().on_open(conn) + for i in range(banscore): + self.send_message(msg_verack()) + + def on_reject(self, conn, message): pass + +# Node that never sends a version. This one just sits idle and hopes to receive +# any message (it shouldn't!) +class CNodeNoVersionIdle(CLazyNode): + def __init__(self): + super().__init__() + +# Node that sends a version but not a verack. +class CNodeNoVerackIdle(CLazyNode): + def __init__(self): + self.version_received = False + super().__init__() + + def on_reject(self, conn, message): pass + def on_verack(self, conn, message): pass + # When version is received, don't reply with a verack. Instead, see if the + # node will give us a message that it shouldn't. This is not an exhaustive + # list! + def on_version(self, conn, message): + self.version_received = True + conn.send_message(msg_ping()) + conn.send_message(msg_getaddr()) + +class P2PLeakTest(BitcoinTestFramework): + def __init__(self): + super().__init__() + self.num_nodes = 1 + def setup_network(self): + extra_args = [['-debug', '-banscore='+str(banscore)] + for i in range(self.num_nodes)] + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) + + def run_test(self): + no_version_bannode = CNodeNoVersionBan() + no_version_idlenode = CNodeNoVersionIdle() + no_verack_idlenode = CNodeNoVerackIdle() + + connections = [] + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], no_version_bannode, send_version=False)) + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], no_version_idlenode, send_version=False)) + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], no_verack_idlenode)) + no_version_bannode.add_connection(connections[0]) + no_version_idlenode.add_connection(connections[1]) + no_verack_idlenode.add_connection(connections[2]) + + NetworkThread().start() # Start up network handling in another thread + + assert(wait_until(lambda: no_version_bannode.connected and no_version_idlenode.connected and no_verack_idlenode.version_received, timeout=10)) + + # Mine a block and make sure that it's not sent to the connected nodes + self.nodes[0].generate(1) + + #Give the node enough time to possibly leak out a message + time.sleep(5) + + #This node should have been banned + assert(no_version_bannode.connection.state == "closed") + + [conn.disconnect_node() for conn in connections] + + # Make sure no unexpected messages came in + assert(no_version_bannode.unexpected_msg == False) + assert(no_version_idlenode.unexpected_msg == False) + assert(no_verack_idlenode.unexpected_msg == False) + +if __name__ == '__main__': + P2PLeakTest().main() diff --git a/qa/rpc-tests/p2p-timeouts.py b/qa/rpc-tests/p2p-timeouts.py new file mode 100755 index 0000000000..f1b190587d --- /dev/null +++ b/qa/rpc-tests/p2p-timeouts.py @@ -0,0 +1,103 @@ +#!/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. +""" TimeoutsTest -- test various net timeouts (only in extended tests) + +- Create three bitcoind nodes: + + no_verack_node - we never send a verack in response to their version + no_version_node - we never send a version (only a ping) + no_send_node - we never send any P2P message. + +- Start all three nodes +- Wait 1 second +- Assert that we're connected +- Send a ping to no_verack_node and no_version_node +- Wait 30 seconds +- Assert that we're still connected +- Send a ping to no_verack_node and no_version_node +- Wait 31 seconds +- Assert that we're no longer connected (timeout to receive version/verack is 60 seconds) +""" + +from time import sleep + +from test_framework.mininode import * +from test_framework.test_framework import BitcoinTestFramework +from test_framework.util import * + +class TestNode(SingleNodeConnCB): + def __init__(self): + SingleNodeConnCB.__init__(self) + self.connected = False + self.received_version = False + + def on_open(self, conn): + self.connected = True + + def on_close(self, conn): + self.connected = False + + def on_version(self, conn, message): + # Don't send a verack in response + self.received_version = True + +class TimeoutsTest(BitcoinTestFramework): + def __init__(self): + super().__init__() + self.setup_clean_chain = True + self.num_nodes = 1 + + def setup_network(self): + self.nodes = [] + + # Start up node0 to be a version 1, pre-segwit node. + self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, + [["-debug", "-logtimemicros=1"]]) + + def run_test(self): + # Setup the p2p connections and start up the network thread. + self.no_verack_node = TestNode() # never send verack + self.no_version_node = TestNode() # never send version (just ping) + self.no_send_node = TestNode() # never send anything + + connections = [] + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.no_verack_node)) + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.no_version_node, send_version=False)) + connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], self.no_send_node, send_version=False)) + self.no_verack_node.add_connection(connections[0]) + self.no_version_node.add_connection(connections[1]) + self.no_send_node.add_connection(connections[2]) + + NetworkThread().start() # Start up network handling in another thread + + sleep(1) + + assert(self.no_verack_node.connected) + assert(self.no_version_node.connected) + assert(self.no_send_node.connected) + + ping_msg = msg_ping() + connections[0].send_message(ping_msg) + connections[1].send_message(ping_msg) + + sleep(30) + + assert(self.no_verack_node.received_version) + + assert(self.no_verack_node.connected) + assert(self.no_version_node.connected) + assert(self.no_send_node.connected) + + connections[0].send_message(ping_msg) + connections[1].send_message(ping_msg) + + sleep(31) + + assert(not self.no_verack_node.connected) + assert(not self.no_version_node.connected) + assert(not self.no_send_node.connected) + +if __name__ == '__main__': + TimeoutsTest().main() diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py index 91daa4ab1f..5b563c58ae 100755 --- a/qa/rpc-tests/test_framework/mininode.py +++ b/qa/rpc-tests/test_framework/mininode.py @@ -1540,6 +1540,7 @@ class NodeConnCB(object): if conn.ver_send > BIP0031_VERSION: conn.send_message(msg_pong(message.nonce)) def on_reject(self, conn, message): pass + def on_open(self, conn): pass def on_close(self, conn): pass def on_mempool(self, conn): pass def on_pong(self, conn, message): pass @@ -1614,7 +1615,7 @@ class NodeConn(asyncore.dispatcher): "regtest": b"\xfa\xbf\xb5\xda", # regtest } - def __init__(self, dstaddr, dstport, rpc, callback, net="regtest", services=NODE_NETWORK): + def __init__(self, dstaddr, dstport, rpc, callback, net="regtest", services=NODE_NETWORK, send_version=True): asyncore.dispatcher.__init__(self, map=mininode_socket_map) self.log = logging.getLogger("NodeConn(%s:%d)" % (dstaddr, dstport)) self.dstaddr = dstaddr @@ -1631,14 +1632,16 @@ class NodeConn(asyncore.dispatcher): self.disconnect = False self.nServices = 0 - # stuff version msg into sendbuf - vt = msg_version() - vt.nServices = services - vt.addrTo.ip = self.dstaddr - vt.addrTo.port = self.dstport - vt.addrFrom.ip = "0.0.0.0" - vt.addrFrom.port = 0 - self.send_message(vt, True) + if send_version: + # stuff version msg into sendbuf + vt = msg_version() + vt.nServices = services + vt.addrTo.ip = self.dstaddr + vt.addrTo.port = self.dstport + vt.addrFrom.ip = "0.0.0.0" + vt.addrFrom.port = 0 + self.send_message(vt, True) + print('MiniNode: Connecting to Bitcoin Node IP # ' + dstaddr + ':' \ + str(dstport)) @@ -1652,8 +1655,10 @@ class NodeConn(asyncore.dispatcher): self.log.debug(msg) def handle_connect(self): - self.show_debug_msg("MiniNode: Connected & Listening: \n") - self.state = "connected" + if self.state != "connected": + self.show_debug_msg("MiniNode: Connected & Listening: \n") + self.state = "connected" + self.cb.on_open(self) def handle_close(self): self.show_debug_msg("MiniNode: Closing Connection to %s:%d... " @@ -1681,11 +1686,20 @@ class NodeConn(asyncore.dispatcher): def writable(self): with mininode_lock: + pre_connection = self.state == "connecting" length = len(self.sendbuf) - return (length > 0) + return (length > 0 or pre_connection) def handle_write(self): with mininode_lock: + # asyncore does not expose socket connection, only the first read/write + # event, thus we must check connection manually here to know when we + # actually connect + if self.state == "connecting": + self.handle_connect() + if not self.writable(): + return + try: sent = self.send(self.sendbuf) except: diff --git a/src/addrman.cpp b/src/addrman.cpp index f3c238fbb2..b6ab4c6305 100644 --- a/src/addrman.cpp +++ b/src/addrman.cpp @@ -53,11 +53,7 @@ bool CAddrInfo::IsTerrible(int64_t nNow) const double CAddrInfo::GetChance(int64_t nNow) const { double fChance = 1.0; - - int64_t nSinceLastTry = nNow - nLastTry; - - if (nSinceLastTry < 0) - nSinceLastTry = 0; + int64_t nSinceLastTry = std::max<int64_t>(nNow - nLastTry, 0); // deprioritize very recent attempts away if (nSinceLastTry < 60 * 10) diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 6c6f677df7..383d9849af 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -97,10 +97,10 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1510704000; // November 15th, 2017. // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90"); + consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000003f94d1ad391682fe038bf5"); // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x0000000000000000030abc968e1bd635736e880b946085c93152969b9a81a6e2"); //447235 + consensus.defaultAssumeValid = uint256S("0x00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90"); //453354 /** * The message start string is designed to be unlikely to occur in normal data. @@ -201,10 +201,10 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1493596800; // May 1st 2017 // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000198b4def2baa9338d6"); + consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000001f057509eba81aed91"); // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0x000000000871ee6842d3648317ccc8a435eb8cc3c2429aee94faff9ba26b05a0"); //1043841 + consensus.defaultAssumeValid = uint256S("0x00000000000128796ee387cf110ccb9d2f36cffaf7f73079c995377c65ac0dcc"); //1079274 pchMessageStart[0] = 0x0b; pchMessageStart[1] = 0x11; diff --git a/src/clientversion.h b/src/clientversion.h index 0b27bb1bdf..69154d546d 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -15,7 +15,7 @@ //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 -#define CLIENT_VERSION_MINOR 13 +#define CLIENT_VERSION_MINOR 14 #define CLIENT_VERSION_REVISION 99 #define CLIENT_VERSION_BUILD 0 diff --git a/src/httprpc.cpp b/src/httprpc.cpp index daac7a0f1a..8ac6925acd 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -112,7 +112,7 @@ static bool multiUserAuthorized(std::string strUserPass) std::string strSalt = vFields[1]; std::string strHash = vFields[2]; - unsigned int KEY_SIZE = 32; + static const unsigned int KEY_SIZE = 32; unsigned char out[KEY_SIZE]; CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out); diff --git a/src/net.cpp b/src/net.cpp index 505eb971c0..de5fc29693 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1388,6 +1388,11 @@ void CConnman::ThreadSocketHandler() LogPrintf("ping timeout: %fs\n", 0.000001 * (GetTimeMicros() - pnode->nPingUsecStart)); pnode->fDisconnect = true; } + else if (!pnode->fSuccessfullyConnected) + { + LogPrintf("version handshake timeout from %d\n", pnode->id); + pnode->fDisconnect = true; + } } } { diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 7d76aa0b48..3ec1a1c27d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1190,8 +1190,31 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr } } + if (strCommand == NetMsgType::REJECT) + { + if (fDebug) { + try { + std::string strMsg; unsigned char ccode; std::string strReason; + vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH); - if (strCommand == NetMsgType::VERSION) + std::ostringstream ss; + ss << strMsg << " code " << itostr(ccode) << ": " << strReason; + + if (strMsg == NetMsgType::BLOCK || strMsg == NetMsgType::TX) + { + uint256 hash; + vRecv >> hash; + ss << ": hash " << hash.ToString(); + } + LogPrint("net", "Reject %s\n", SanitizeString(ss.str())); + } catch (const std::ios_base::failure&) { + // Avoid feedback loops by preventing reject messages from triggering a new reject message. + LogPrint("net", "Unparseable reject message received\n"); + } + } + } + + else if (strCommand == NetMsgType::VERSION) { // Each connection can only send one version message if (pfrom->nVersion != 0) @@ -1402,6 +1425,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr pfrom->fSuccessfullyConnected = true; } + else if (!pfrom->fSuccessfullyConnected) + { + // Must have a verack message before anything else + LOCK(cs_main); + Misbehaving(pfrom->GetId(), 1); + return false; + } else if (strCommand == NetMsgType::ADDR) { @@ -2549,31 +2579,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr pfrom->fRelayTxes = true; } - - else if (strCommand == NetMsgType::REJECT) - { - if (fDebug) { - try { - std::string strMsg; unsigned char ccode; std::string strReason; - vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH); - - std::ostringstream ss; - ss << strMsg << " code " << itostr(ccode) << ": " << strReason; - - if (strMsg == NetMsgType::BLOCK || strMsg == NetMsgType::TX) - { - uint256 hash; - vRecv >> hash; - ss << ": hash " << hash.ToString(); - } - LogPrint("net", "Reject %s\n", SanitizeString(ss.str())); - } catch (const std::ios_base::failure&) { - // Avoid feedback loops by preventing reject messages from triggering a new reject message. - LogPrint("net", "Unparseable reject message received\n"); - } - } - } - else if (strCommand == NetMsgType::FEEFILTER) { CAmount newFeeFilter = 0; vRecv >> newFeeFilter; @@ -2601,6 +2606,36 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr return true; } +static bool SendRejectsAndCheckIfBanned(CNode* pnode, CConnman& connman) +{ + AssertLockHeld(cs_main); + CNodeState &state = *State(pnode->GetId()); + + BOOST_FOREACH(const CBlockReject& reject, state.rejects) { + connman.PushMessage(pnode, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, (std::string)NetMsgType::BLOCK, reject.chRejectCode, reject.strRejectReason, reject.hashBlock)); + } + state.rejects.clear(); + + if (state.fShouldBan) { + state.fShouldBan = false; + if (pnode->fWhitelisted) + LogPrintf("Warning: not punishing whitelisted peer %s!\n", pnode->addr.ToString()); + else if (pnode->fAddnode) + LogPrintf("Warning: not punishing addnoded peer %s!\n", pnode->addr.ToString()); + else { + pnode->fDisconnect = true; + if (pnode->addr.IsLocal()) + LogPrintf("Warning: not banning local peer %s!\n", pnode->addr.ToString()); + else + { + connman.Ban(pnode->addr, BanReasonNodeMisbehaving); + } + } + return true; + } + return false; +} + bool ProcessMessages(CNode* pfrom, CConnman& connman, const std::atomic<bool>& interruptMsgProc) { const CChainParams& chainparams = Params(); @@ -2711,8 +2746,12 @@ bool ProcessMessages(CNode* pfrom, CConnman& connman, const std::atomic<bool>& i PrintExceptionContinue(NULL, "ProcessMessages()"); } - if (!fRet) + if (!fRet) { LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id); + } + + LOCK(cs_main); + SendRejectsAndCheckIfBanned(pfrom, connman); return fMoreWork; } @@ -2778,30 +2817,10 @@ bool SendMessages(CNode* pto, CConnman& connman, const std::atomic<bool>& interr if (!lockMain) return true; + if (SendRejectsAndCheckIfBanned(pto, connman)) + return true; CNodeState &state = *State(pto->GetId()); - BOOST_FOREACH(const CBlockReject& reject, state.rejects) - connman.PushMessage(pto, msgMaker.Make(NetMsgType::REJECT, (std::string)NetMsgType::BLOCK, reject.chRejectCode, reject.strRejectReason, reject.hashBlock)); - state.rejects.clear(); - - if (state.fShouldBan) { - state.fShouldBan = false; - if (pto->fWhitelisted) - LogPrintf("Warning: not punishing whitelisted peer %s!\n", pto->addr.ToString()); - else if (pto->fAddnode) - LogPrintf("Warning: not punishing addnoded peer %s!\n", pto->addr.ToString()); - else { - pto->fDisconnect = true; - if (pto->addr.IsLocal()) - LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString()); - else - { - connman.Ban(pto->addr, BanReasonNodeMisbehaving); - } - return true; - } - } - // Address refresh broadcast int64_t nNow = GetTimeMicros(); if (!IsInitialBlockDownload() && pto->nNextLocalAddrSend < nNow) { diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index f8aba70d92..d4fd8bd372 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -563,9 +563,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) } // after fee - nAfterFee = nAmount - nPayFee; - if (nAfterFee < 0) - nAfterFee = 0; + nAfterFee = std::max<CAmount>(nAmount - nPayFee, 0); } // actually update labels diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 5d6c0e2e31..e0961fe7dd 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -762,6 +762,8 @@ bool SetStartOnSystemStartup(bool fAutoStart) #elif defined(Q_OS_MAC) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // based on: https://github.com/Mozketo/LaunchAtLoginController/blob/master/LaunchAtLoginController.m #include <CoreFoundation/CoreFoundation.h> @@ -824,6 +826,7 @@ bool SetStartOnSystemStartup(bool fAutoStart) } return true; } +#pragma GCC diagnostic pop #else bool GetStartOnSystemStartup() { return false; } diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts index 67c595ab34..f38c425137 100644 --- a/src/qt/locale/bitcoin_cs.ts +++ b/src/qt/locale/bitcoin_cs.ts @@ -330,6 +330,10 @@ <translation>Kliknutím opět umožníš spojení do sítě.</translation> </message> <message> + <source>Syncing Headers (%1%)...</source> + <translation>Synchronizuji záhlaví bloků (%1 %)…</translation> + </message> + <message> <source>Reindexing blocks on disk...</source> <translation>Vytvářím nový index bloků na disku...</translation> </message> @@ -482,6 +486,10 @@ <translation>%1 klient</translation> </message> <message> + <source>Connecting to peers...</source> + <translation>Připojuji se…</translation> + </message> + <message> <source>Catching up...</source> <translation>Stahuji...</translation> </message> @@ -3090,6 +3098,14 @@ <translation>Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID)</translation> </message> <message> + <source>Extra transactions to keep in memory for compact block reconstructions (default: %u)</source> + <translation>Počet extra transakcí, které se mají držet v paměti pro účely rekonstrukce kompaktních bloků (výchozí: %u)</translation> + </message> + <message> + <source>If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)</source> + <translation>Pokud je tenhle blok v řetězci, tak předpokládat, že on i jeho následníci jsou platní, a potenciálně přeskočit ověřování jejich skriptů (0 = ověřovat vše, výchozí: %s, testnet: %s)</translation> + </message> + <message> <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source> <translation>Maximální povolené seřizování času mediánem časů protějšků. Místní vnímání času může být ovlivněno protějšky, a to dopředu nebo dozadu až o toto množství. (výchozí: %u vteřin)</translation> </message> @@ -3106,6 +3122,14 @@ <translation>Prosíme, zapoj se nebo přispěj, pokud ti %s přijde užitečný. Více informací o programu je na %s.</translation> </message> <message> + <source>Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)</source> + <translation>Omezit nároky na úložný prostor prořezáváním (mazáním) starých bloků. Tato volba také umožní použít RPC volání pruneblockchain ke smazání konkrétních bloků a dále automatické prořezávání starých bloků, pokud je zadána cílová velikost souborů s bloky v MiB. Tento režim není slučitelný s -txindex ani -rescan. Upozornění: opětovná změna tohoto nastavení bude vyžadovat nové stažení celého řetězce bloků. (výchozí: 0 = bloky neprořezávat, 1 = povolit ruční prořezávání skrze RPC, >%u = automatické prořezávání bloků tak, aby byla udržena cílová velikost souborů s bloky, v MiB)</translation> + </message> + <message> + <source>Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)</source> + <translation>Nastavit nejnižší akceptovatelný poplatek (v %s/kB) pro transakce, které mají být zahrnuty do nových bloků. (výchozí: %s)</translation> + </message> + <message> <source>Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)</source> <translation>Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, <0 = nechat daný počet jader volný, výchozí: %d)</translation> </message> diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts index cc834a8b96..f62f1e4a73 100644 --- a/src/qt/locale/bitcoin_en.ts +++ b/src/qt/locale/bitcoin_en.ts @@ -1083,7 +1083,7 @@ <translation>Use a custom data directory:</translation> </message> <message> - <location filename="../intro.cpp" line="+89"/> + <location filename="../intro.cpp" line="+94"/> <source>Error: Specified data directory "%1" cannot be created.</source> <translation type="unfinished"></translation> </message> diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts index f95b01d33b..313d5e3be1 100644 --- a/src/qt/locale/bitcoin_et.ts +++ b/src/qt/locale/bitcoin_et.ts @@ -214,6 +214,10 @@ </context> <context> <name>BanTableModel</name> + <message> + <source>IP/Netmask</source> + <translation>IP/Võrgumask</translation> + </message> </context> <context> <name>BitcoinGUI</name> @@ -788,6 +792,10 @@ <translation>&Aken</translation> </message> <message> + <source>Hide tray icon</source> + <translation>Peida tegumiriba ikoon</translation> + </message> + <message> <source>Show only a tray icon after minimizing the window.</source> <translation>Minimeeri systray alale.</translation> </message> @@ -904,9 +912,29 @@ <translation>N/A</translation> </message> <message> + <source>%1 ms</source> + <translation>%1 ms</translation> + </message> + <message numerus="yes"> + <source>%n hour(s)</source> + <translation><numerusform>%n tund</numerusform><numerusform>%n tundi</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n day(s)</source> + <translation><numerusform>%n päev</numerusform><numerusform>%n päeva</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n week(s)</source> + <translation><numerusform>%n nädal</numerusform><numerusform>%n nädalat</numerusform></translation> + </message> + <message> <source>%1 and %2</source> <translation>%1 ja %2</translation> </message> + <message numerus="yes"> + <source>%n year(s)</source> + <translation><numerusform>%n aasta</numerusform><numerusform>%n aastat</numerusform></translation> + </message> </context> <context> <name>QObject::QObject</name> diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts index 92682ff297..2180023159 100644 --- a/src/qt/locale/bitcoin_fr.ts +++ b/src/qt/locale/bitcoin_fr.ts @@ -330,6 +330,10 @@ <translation>Cliquer pour réactiver l'activité réseau.</translation> </message> <message> + <source>Syncing Headers (%1%)...</source> + <translation>Synchronisation des en-têtes (%1)...</translation> + </message> + <message> <source>Reindexing blocks on disk...</source> <translation>Réindexation des blocs sur le disque...</translation> </message> diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts index 484e7f86bd..9f2c7626de 100644 --- a/src/qt/locale/bitcoin_it.ts +++ b/src/qt/locale/bitcoin_it.ts @@ -703,10 +703,6 @@ <translation>Errore</translation> </message> <message numerus="yes"> - <source>%n GB of free space available</source> - <translation><numerusform>GB di spazio libero disponibile</numerusform><numerusform>%n GB di spazio disponibile</numerusform></translation> - </message> - <message numerus="yes"> <source>(of %n GB needed)</source> <translation><numerusform>(di %nGB richiesti)</numerusform><numerusform>(%n GB richiesti)</numerusform></translation> </message> diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts index c637035303..3202587cbd 100644 --- a/src/qt/locale/bitcoin_pt_BR.ts +++ b/src/qt/locale/bitcoin_pt_BR.ts @@ -23,7 +23,7 @@ </message> <message> <source>C&lose</source> - <translation>Fechar</translation> + <translation>&Fechar</translation> </message> <message> <source>Delete the currently selected address from the list</source> @@ -39,7 +39,7 @@ </message> <message> <source>&Delete</source> - <translation>&Excluir</translation> + <translation>E&xcluir</translation> </message> <message> <source>Choose the address to send coins to</source> @@ -102,7 +102,7 @@ <name>AddressTableModel</name> <message> <source>Label</source> - <translation>Rótuo</translation> + <translation>Rótulo</translation> </message> <message> <source>Address</source> @@ -110,7 +110,7 @@ </message> <message> <source>(no label)</source> - <translation>(sem rótuo)</translation> + <translation>(sem rótulo)</translation> </message> </context> <context> @@ -231,7 +231,7 @@ <name>BitcoinGUI</name> <message> <source>Sign &message...</source> - <translation>&Assinar mensagem...</translation> + <translation>Assinar &mensagem...</translation> </message> <message> <source>Synchronizing with network...</source> @@ -375,7 +375,7 @@ </message> <message> <source>&Show / Hide</source> - <translation>&Exibir/Ocultar</translation> + <translation>&Exibir / Ocultar</translation> </message> <message> <source>Show or hide the main Window</source> @@ -479,7 +479,7 @@ </message> <message> <source>%1 client</source> - <translation>%1</translation> + <translation>%1 cliente</translation> </message> <message> <source>Connecting to peers...</source> @@ -688,7 +688,7 @@ </message> <message> <source>(no label)</source> - <translation>(sem rótuo)</translation> + <translation>(sem rótulo)</translation> </message> <message> <source>change from %1 (%2)</source> @@ -1361,6 +1361,10 @@ <translation>Nó/Serviço</translation> </message> <message> + <source>NodeId</source> + <translation>ID do nó</translation> + </message> + <message> <source>Ping</source> <translation>Ping</translation> </message> @@ -1900,7 +1904,7 @@ </message> <message> <source>Label</source> - <translation>Rótuo</translation> + <translation>Rótulo</translation> </message> <message> <source>Message</source> @@ -1923,7 +1927,7 @@ </message> <message> <source>Label</source> - <translation>Rótuo</translation> + <translation>Rótulo</translation> </message> <message> <source>Message</source> @@ -1931,7 +1935,7 @@ </message> <message> <source>(no label)</source> - <translation>(sem rótuo)</translation> + <translation>(sem rótulo)</translation> </message> <message> <source>(no message)</source> @@ -2210,7 +2214,7 @@ </message> <message> <source>(no label)</source> - <translation>(sem rótuo)</translation> + <translation>(sem rótulo)</translation> </message> </context> <context> @@ -2665,7 +2669,7 @@ </message> <message> <source>Label</source> - <translation>Rótuo</translation> + <translation>Rótulo</translation> </message> <message numerus="yes"> <source>Open for %n more block(s)</source> @@ -2741,7 +2745,7 @@ </message> <message> <source>(no label)</source> - <translation>(sem rótuo)</translation> + <translation>(sem rótulo)</translation> </message> <message> <source>Transaction status. Hover over this field to show number of confirmations.</source> @@ -2888,7 +2892,7 @@ </message> <message> <source>Label</source> - <translation>Rótuo</translation> + <translation>Rótulo</translation> </message> <message> <source>Address</source> @@ -3798,6 +3802,10 @@ <translation>Retransmitir P2SH não multisig (padrão: %u)</translation> </message> <message> + <source>Send transactions with full-RBF opt-in enabled (default: %u)</source> + <translation>Ativar opção full-RBF nas transações enviadas (padrão: %u)</translation> + </message> + <message> <source>Set key pool size to <n> (default: %u)</source> <translation>Defina o tamanho da chave para piscina<n> (padrão: %u)</translation> </message> @@ -3819,7 +3827,7 @@ </message> <message> <source>Specify pid file (default: %s)</source> - <translation>Especificar aqrquivo pid (padrão: %s)</translation> + <translation>Especificar arquivo pid (padrão: %s)</translation> </message> <message> <source>Spend unconfirmed change when sending transactions (default: %u)</source> diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts index c37a518968..2de0d14ddd 100644 --- a/src/qt/locale/bitcoin_tr.ts +++ b/src/qt/locale/bitcoin_tr.ts @@ -35,7 +35,7 @@ </message> <message> <source>&Export</source> - <translation>&Dışa aktar</translation> + <translation>&Dışarı aktar</translation> </message> <message> <source>&Delete</source> @@ -59,15 +59,23 @@ </message> <message> <source>Receiving addresses</source> - <translation>Alınan adresler</translation> + <translation>Alım adresleri</translation> + </message> + <message> + <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> + <translation>Bunlar ödemeleri göndermek için kullanacağınız Bitcoin adreslerinizdir. Bitcoin yollamadan önce tutarı ve alıcının alım adresini her zaman kontrol ediniz.</translation> + </message> + <message> + <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source> + <translation>Bunlar ödemeleri almak için kullanacağınız Bitcoin adreslerinizdir. Her işlem için yeni bir alım adresi kullanmanız tavsiye edilir.</translation> </message> <message> <source>&Copy Address</source> - <translation>&Adres Kopyala</translation> + <translation>&Adresi Kopyala</translation> </message> <message> <source>Copy &Label</source> - <translation>&Etiketi kopyala</translation> + <translation>&Etiketi Kopyala</translation> </message> <message> <source>&Edit</source> @@ -75,13 +83,21 @@ </message> <message> <source>Export Address List</source> - <translation>Adres listesini dışarı aktar</translation> + <translation>Adres Listesini Dışarı Aktar</translation> + </message> + <message> + <source>Comma separated file (*.csv)</source> + <translation>Virgülle ayrılmış değerler dosyası (*.csv)</translation> </message> <message> <source>Exporting Failed</source> - <translation>Dışarı aktarmada hata</translation> + <translation>Dışarı Aktarım Başarısız Oldu</translation> + </message> + <message> + <source>There was an error trying to save the address list to %1. Please try again.</source> + <translation>Adres listesinin %1 konumuna kaydedilmesi sırasında bir hata meydana geldi. Lütfen tekrar deneyin.</translation> </message> - </context> +</context> <context> <name>AddressTableModel</name> <message> @@ -101,7 +117,7 @@ <name>AskPassphraseDialog</name> <message> <source>Passphrase Dialog</source> - <translation>Parola diyaloğu</translation> + <translation>Parola Diyaloğu</translation> </message> <message> <source>Enter passphrase</source> @@ -116,8 +132,16 @@ <translation>Yeni parolayı tekrarlayınız</translation> </message> <message> + <source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source> + <translation>Cüzdan için yeni parolayı giriniz.<br/>Lütfen <b>on ya da daha fazla rastgele karakter</b> veya <b>sekiz ya da daha fazla kelime</b> içeren bir parola kullanınız.</translation> + </message> + <message> <source>Encrypt wallet</source> - <translation>Şifrelenmiş cüzdan</translation> + <translation>Cüzdanı şifrele</translation> + </message> + <message> + <source>This operation needs your wallet passphrase to unlock the wallet.</source> + <translation>Bu eylem cüzdan kilidini açmak için cüzdan parolanızı gerektirir.</translation> </message> <message> <source>Unlock wallet</source> @@ -125,17 +149,29 @@ </message> <message> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> - <translation>Bu işlem, cüzdan şifresini çözmek için cüzdan parolanıza ihtiyaç duyuyor.</translation> + <translation>Bu eylem, cüzdan şifresini çözmek için cüzdan parolanıza ihtiyaç duyuyor.</translation> + </message> + <message> + <source>Decrypt wallet</source> + <translation>Cüzdanın şifrelemesini aç</translation> </message> <message> <source>Change passphrase</source> <translation>Parola değiştir</translation> </message> <message> + <source>Enter the old passphrase and new passphrase to the wallet.</source> + <translation>Eski ve yeni parolanızı cüzdana giriniz.</translation> + </message> + <message> <source>Confirm wallet encryption</source> <translation>Cüzdan şifrelemesini onayla</translation> </message> <message> + <source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR BITCOINS</b>!</source> + <translation>Uyarı: Eğer cüzdanınızı şifreler ve parolanızı kaybederseniz <b>TÜM BİTCOİNLERİNİZİ KAYBEDECEKSİNİZ</b>!</translation> + </message> + <message> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Cüzdanınızı şifrelemek istediğinizden emin misiniz?</translation> </message> @@ -144,34 +180,66 @@ <translation>Cüzdan şifrelendi</translation> </message> <message> + <source>%1 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>Şifreleme işleminin bitirilmesi için %1 kapatılacak. Her ne kadar cüzdanınızı şifreleseniz de şifrelemenin bitcoinlerinizi bilgisayarınıza bulaşan zararlılardan tam olarak koruyamayacağını unutmayın.</translation> + </message> + <message> + <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> + <translation>ÖNEMLİ: Önceden yapmış olduğunuz cüzdan dosyası yedeklemelerinin yeni oluşturulan şifrelenmiş cüzdan dosyası ile değiştirilmeleri gerekir. Güvenlik nedenleriyle yeni, şifrelenmiş cüzdanı kullanmaya başladığınızda eski şifrelenmemiş cüzdan dosyaları işe yaramaz hale gelecektir.</translation> + </message> + <message> <source>Wallet encryption failed</source> <translation>Cüzdan şifreleme başarısız</translation> </message> <message> + <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> + <translation>Dahili bir hata yüzünden cüzdan şifrelemesi başarısız oldu. Cüzdanın şifrelenmedi.</translation> + </message> + <message> + <source>The supplied passphrases do not match.</source> + <translation>Girilen parolalar birbiriyle eşleşmiyor.</translation> + </message> + <message> <source>Wallet unlock failed</source> - <translation>Cüzdan kilidi kaldırma hatası</translation> + <translation>Cüzdan kilidini kaldırma başarısız oldu</translation> + </message> + <message> + <source>The passphrase entered for the wallet decryption was incorrect.</source> + <translation>Cüzdan şifresinin açılması için girilen parola yanlıştı.</translation> + </message> + <message> + <source>Wallet decryption failed</source> + <translation>Cüzdan şifresinin açılması başarısız oldu</translation> + </message> + <message> + <source>Wallet passphrase was successfully changed.</source> + <translation>Cüzdan parolası başarılı bir şekilde değiştirildi.</translation> + </message> + <message> + <source>Warning: The Caps Lock key is on!</source> + <translation>Uyarı: Caps Lock tuşu etkin durumda!</translation> </message> - </context> +</context> <context> <name>BanTableModel</name> <message> <source>IP/Netmask</source> - <translation>IP/Ağ maskesi</translation> + <translation>IP/Ağ Maskesi</translation> </message> <message> <source>Banned Until</source> - <translation>Şu vakte kadar yasaklı:</translation> + <translation>Şu zamana kadar yasaklı:</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <source>Sign &message...</source> - <translation>&Mesaj imzala...</translation> + <translation>&İleti imzala...</translation> </message> <message> <source>Synchronizing with network...</source> - <translation>Şebeke ile senkronizasyon...</translation> + <translation>Ağ ile senkronize ediliyor...</translation> </message> <message> <source>&Overview</source> @@ -187,15 +255,15 @@ </message> <message> <source>&Transactions</source> - <translation>&Muameleler</translation> + <translation>&İşlemler</translation> </message> <message> <source>Browse transaction history</source> - <translation>Muamele tarihçesini tara</translation> + <translation>İşlem geçmişine gözat</translation> </message> <message> <source>E&xit</source> - <translation>&Çık</translation> + <translation>Ç&ık</translation> </message> <message> <source>Quit application</source> @@ -203,7 +271,7 @@ </message> <message> <source>&About %1</source> - <translation>%1 &hakkında</translation> + <translation>%1 &Hakkında</translation> </message> <message> <source>Show information about %1</source> @@ -211,11 +279,11 @@ </message> <message> <source>About &Qt</source> - <translation>&Qt hakkında</translation> + <translation>&Qt Hakkında</translation> </message> <message> <source>Show information about Qt</source> - <translation>Qt hakkında bilgi görüntü</translation> + <translation>Qt hakkında bilgi göster</translation> </message> <message> <source>&Options...</source> @@ -227,15 +295,15 @@ </message> <message> <source>&Encrypt Wallet...</source> - <translation>Cüzdanı &şifrele...</translation> + <translation>Cüzdanı &Şifrele...</translation> </message> <message> <source>&Backup Wallet...</source> - <translation>Cüzdanı &yedekle...</translation> + <translation>Cüzdanı &Yedekle...</translation> </message> <message> <source>&Change Passphrase...</source> - <translation>Parolayı &değiştir...</translation> + <translation>Parolayı &Değiştir...</translation> </message> <message> <source>&Sending addresses...</source> @@ -247,15 +315,31 @@ </message> <message> <source>Open &URI...</source> - <translation>&URI aç...</translation> + <translation>&URI Aç...</translation> + </message> + <message> + <source>Click to disable network activity.</source> + <translation>Ağ etkinliğini devre dışı bırakmak için tıklayın.</translation> + </message> + <message> + <source>Network activity disabled.</source> + <translation>Ağ etkinliği devre dışı bırakılmış.</translation> + </message> + <message> + <source>Click to enable network activity again.</source> + <translation>Ağ etkinliğini yeniden etkinleştirmek için tıklayın.</translation> + </message> + <message> + <source>Syncing Headers (%1%)...</source> + <translation>Üstbilgiler Senkronize Ediliyor (%1%)...</translation> </message> <message> <source>Reindexing blocks on disk...</source> - <translation>Diskteki bloklar yeniden endeksleniyor...</translation> + <translation>Diskteki bloklar yeniden indeksleniyor...</translation> </message> <message> <source>Send coins to a Bitcoin address</source> - <translation>Bir Bitcoin adresine Bitcoin yolla</translation> + <translation>Bir bitcoin adresine bitcoin gönder</translation> </message> <message> <source>Backup wallet to another location</source> @@ -275,7 +359,7 @@ </message> <message> <source>&Verify message...</source> - <translation>Mesaj &kontrol et...</translation> + <translation>İletiyi &kontrol et...</translation> </message> <message> <source>Bitcoin</source> @@ -295,23 +379,23 @@ </message> <message> <source>&Show / Hide</source> - <translation>&Göster / Sakla</translation> + <translation>&Göster / Gizle</translation> </message> <message> <source>Show or hide the main Window</source> - <translation>Ana pencereyi görüntüle ya da sakla</translation> + <translation>Ana pencereyi göster ya da gizle</translation> </message> <message> <source>Encrypt the private keys that belong to your wallet</source> - <translation>Cüzdanınızın özel anahtarlarını şifrele</translation> + <translation>Cüzdanınıza ait özel anahtarları şifreleyin</translation> </message> <message> <source>Sign messages with your Bitcoin addresses to prove you own them</source> - <translation>Mesajları adreslerin size ait olduğunu ispatlamak için Bitcoin adresleri ile imzala</translation> + <translation>İletileri adreslerin size ait olduğunu ispatlamak için Bitcoin adresleri ile imzala</translation> </message> <message> <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source> - <translation>Belirtilen Bitcoin adresleri ile imzalandıklarından emin olmak için mesajları kontrol et</translation> + <translation>Belirtilen Bitcoin adresleri ile imzalandıklarından emin olmak için iletileri kontrol et</translation> </message> <message> <source>&File</source> @@ -351,7 +435,7 @@ </message> <message numerus="yes"> <source>%n active connection(s) to Bitcoin network</source> - <translation><numerusform>Bitcoin şebekesine %n faal bağlantı</numerusform><numerusform>Bitcoin şebekesine %n faal bağlantı</numerusform></translation> + <translation><numerusform>Bitcoin şebekesine %n faal bağlantı</numerusform><numerusform>Bitcoin ağına %n etkin bağlantı var</numerusform></translation> </message> <message> <source>Indexing blocks on disk...</source> @@ -359,11 +443,11 @@ </message> <message> <source>Processing blocks on disk...</source> - <translation>Bloklar diske yazıdırılıyor...</translation> + <translation>Bloklar diske işleniyor...</translation> </message> <message numerus="yes"> <source>Processed %n block(s) of transaction history.</source> - <translation><numerusform>Muamele tarihçesinden %n blok işlendi.</numerusform><numerusform>Muamele tarihçesinden %n blok işlendi</numerusform></translation> + <translation><numerusform>Muamele tarihçesinden %n blok işlendi.</numerusform><numerusform>İşlem tarihçesinden %n blok işlendi</numerusform></translation> </message> <message> <source>%1 behind</source> @@ -371,11 +455,11 @@ </message> <message> <source>Last received block was generated %1 ago.</source> - <translation>Son alınan blok %1 evvel oluşturulmuştu.</translation> + <translation>Son alınan blok %1 önce oluşturulmuştu.</translation> </message> <message> <source>Transactions after this will not yet be visible.</source> - <translation>Bundan sonraki muameleler henüz görüntülenemez.</translation> + <translation>Bundan sonraki işlemler henüz görüntülenemez.</translation> </message> <message> <source>Error</source> @@ -399,7 +483,11 @@ </message> <message> <source>%1 client</source> - <translation>%1 istemcisi</translation> + <translation>%1 istemci</translation> + </message> + <message> + <source>Connecting to peers...</source> + <translation>Eşlere bağlanılıyor...</translation> </message> <message> <source>Catching up...</source> @@ -414,7 +502,7 @@ <message> <source>Amount: %1 </source> - <translation>Meblağ: %1 + <translation>Tutar: %1 </translation> </message> <message> @@ -437,11 +525,19 @@ </message> <message> <source>Sent transaction</source> - <translation>Muamele yollandı</translation> + <translation>İşlem gönderildi</translation> </message> <message> <source>Incoming transaction</source> - <translation>Gelen muamele</translation> + <translation>Gelen işlem</translation> + </message> + <message> + <source>HD key generation is <b>enabled</b></source> + <translation>HD anahtar oluşturma <b>etkin</b></translation> + </message> + <message> + <source>HD key generation is <b>disabled</b></source> + <translation>HD anahtar oluşturma <b>devre dışı</b></translation> </message> <message> <source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source> @@ -451,7 +547,11 @@ <source>Wallet is <b>encrypted</b> and currently <b>locked</b></source> <translation>Cüzdan <b>şifrelenmiştir</b> ve şu anda <b>kilitlidir</b></translation> </message> - </context> + <message> + <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source> + <translation>Ölümcül bir hata oluştu. Bitcoin yazılımı artık güvenli bir şekilde çalışmaya devam edemediği için kapatılacaktır.</translation> + </message> +</context> <context> <name>CoinControlDialog</name> <message> @@ -468,7 +568,7 @@ </message> <message> <source>Amount:</source> - <translation>Meblağ:</translation> + <translation>Tutar:</translation> </message> <message> <source>Fee:</source> @@ -500,7 +600,7 @@ </message> <message> <source>Amount</source> - <translation>Meblağ</translation> + <translation>Tutar</translation> </message> <message> <source>Received with label</source> @@ -532,13 +632,77 @@ </message> <message> <source>Copy amount</source> + <translation>Tutarı kopyala</translation> + </message> + <message> + <source>Copy transaction ID</source> + <translation>İşlem ID'sini kopyala</translation> + </message> + <message> + <source>Lock unspent</source> + <translation>Harcanmamışı kilitle</translation> + </message> + <message> + <source>Unlock unspent</source> + <translation>Harcanmamışın kilidini aç</translation> + </message> + <message> + <source>Copy quantity</source> <translation>Miktarı kopyala</translation> </message> <message> + <source>Copy fee</source> + <translation>Ücreti kopyala</translation> + </message> + <message> + <source>Copy after fee</source> + <translation>Ücretten sonrasını kopyala</translation> + </message> + <message> + <source>Copy bytes</source> + <translation>Baytları kopyala</translation> + </message> + <message> + <source>Copy dust</source> + <translation>Tozu kopyala</translation> + </message> + <message> + <source>Copy change</source> + <translation>Para üstünü kopyala</translation> + </message> + <message> + <source>(%1 locked)</source> + <translation>(%1 kilitlendi)</translation> + </message> + <message> + <source>yes</source> + <translation>evet</translation> + </message> + <message> + <source>no</source> + <translation>hayır</translation> + </message> + <message> + <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source> + <translation>Eğer herhangi bir alıcı mevcut toz eşiğinden daha düşük bir tutar alırsa bu etiket kırmızıya dönüşür.</translation> + </message> + <message> + <source>Can vary +/- %1 satoshi(s) per input.</source> + <translation>Girdi başına +/- %1 satoshi değişebilir.</translation> + </message> + <message> <source>(no label)</source> <translation>(etiket yok)</translation> </message> - </context> + <message> + <source>change from %1 (%2)</source> + <translation>%1 ögesinden para üstü (%2)</translation> + </message> + <message> + <source>(change)</source> + <translation>(para üstü)</translation> + </message> +</context> <context> <name>EditAddressDialog</name> <message> @@ -561,7 +725,39 @@ <source>&Address</source> <translation>&Adres</translation> </message> - </context> + <message> + <source>New receiving address</source> + <translation>Yeni alım adresi</translation> + </message> + <message> + <source>New sending address</source> + <translation>Yeni gönderi adresi</translation> + </message> + <message> + <source>Edit receiving address</source> + <translation>Alım adresini düzenle</translation> + </message> + <message> + <source>Edit sending address</source> + <translation>Gönderi adresini düzenle</translation> + </message> + <message> + <source>The entered address "%1" is not a valid Bitcoin address.</source> + <translation>Girilen "%1" adresi geçerli bir Bitcoin adresi değildir.</translation> + </message> + <message> + <source>The entered address "%1" is already in the address book.</source> + <translation>Girilen "%1" adresi zaten adres defterinde mevcuttur.</translation> + </message> + <message> + <source>Could not unlock wallet.</source> + <translation>Cüzdan kilidi açılamadı.</translation> + </message> + <message> + <source>New key generation failed.</source> + <translation>Yeni anahtar oluşturulması başarısız oldu.</translation> + </message> +</context> <context> <name>FreespaceChecker</name> <message> @@ -574,7 +770,7 @@ </message> <message> <source>Directory already exists. Add %1 if you intend to create a new directory here.</source> - <translation>Klasör hâlihazırda mevcuttur. Burada yeni bir klasör oluşturmak istiyorsanız, %1 ilâve ediniz.</translation> + <translation>Klasör zaten mevcuttur. Burada yeni bir klasör oluşturmak istiyorsanız, %1 ekleyiniz.</translation> </message> <message> <source>Path already exists, and is not a directory.</source> @@ -656,7 +852,7 @@ </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, Bitcoin blok zincirinin bir kopyasını indirecek ve saklayacaktır. Bu klasörde en az %2GB veri saklanacak ve bu zamanla artacaktır. Cüzdan da bu klasörde saklanacaktır.</translation> + <translation>%1, Bitcoin blok zincirinin bir kopyasını indirecek ve saklayacaktır. Bu klasörde en az %2 GB veri saklanacak ve bu zamanla artacaktır. Cüzdan da bu klasörde saklanacaktır.</translation> </message> <message> <source>Use the default data directory</source> @@ -690,19 +886,55 @@ <translation>Form</translation> </message> <message> + <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source> + <translation>Son işlemler henüz görünmeyebilir ve bu nedenle cüzdanınızın bakiyesi yanlış olabilir. Bu bilgiler, aşağıda detaylandırıldığı gibi, cüzdanınız bitcoin ağı ile senkronizasyonunu tamamladığında doğru olacaktır. </translation> + </message> + <message> + <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source> + <translation>Henüz görüntülenmeyen işlemlerden etkilenen bitcoinleri harcama girişiminde bulunmak ağ tarafından kabul edilmeyecektir.</translation> + </message> + <message> + <source>Number of blocks left</source> + <translation>Kalan blok sayısı</translation> + </message> + <message> + <source>Unknown...</source> + <translation>Bilinmiyor...</translation> + </message> + <message> <source>Last block time</source> <translation>Son blok zamanı</translation> </message> <message> + <source>Progress</source> + <translation>İlerleme</translation> + </message> + <message> + <source>Progress increase per hour</source> + <translation>Saat başı ilerleme artışı</translation> + </message> + <message> + <source>calculating...</source> + <translation>hesaplanıyor...</translation> + </message> + <message> + <source>Estimated time left until synced</source> + <translation>Senkronize edilene kadar kalan tahmini süre</translation> + </message> + <message> <source>Hide</source> - <translation>Sakla</translation> + <translation>Gizle</translation> + </message> + <message> + <source>Unknown. Syncing Headers (%1)...</source> + <translation>Bilinmeyen. Üstbilgiler Senkronize Ediliyor (%1)...</translation> </message> - </context> +</context> <context> <name>OpenURIDialog</name> <message> <source>Open URI</source> - <translation>URI aç</translation> + <translation>URI Aç</translation> </message> <message> <source>Open payment request from URI or file</source> @@ -716,7 +948,11 @@ <source>Select payment request file</source> <translation>Ödeme talebi dosyasını seç</translation> </message> - </context> + <message> + <source>Select payment request file to open</source> + <translation>Açılacak ödeme talebi dosyasını seç</translation> + </message> +</context> <context> <name>OptionsDialog</name> <message> @@ -725,7 +961,7 @@ </message> <message> <source>&Main</source> - <translation>&Esas ayarlar</translation> + <translation>&Genel</translation> </message> <message> <source>Automatically start %1 after logging in to the system.</source> @@ -737,7 +973,7 @@ </message> <message> <source>Size of &database cache</source> - <translation>&Veritabanı tamponunun boyutu</translation> + <translation>&Veritabanı önbelleğinin boyutu</translation> </message> <message> <source>MB</source> @@ -765,15 +1001,15 @@ </message> <message> <source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source> - <translation>Muameleler sekmesinde bağlam menüsü unsurları olarak görünen üçüncü taraf bağlantıları (mesela bir blok tarayıcısı). URL'deki %s, muamele hash değeri ile değiştirilecektir. Birden çok bağlantılar düşey çubuklar | ile ayrılacaktır.</translation> + <translation>İşlemler sekmesinde bağlam menüsü unsurları olarak görünen üçüncü taraf bağlantıları (mesela bir blok tarayıcısı). URL'deki %s, işlem hash değeri ile değiştirilecektir. Birden çok bağlantılar düşey çubuklar | ile ayrılacaktır.</translation> </message> <message> <source>Third party transaction URLs</source> - <translation>Üçüncü taraf muamele URL'leri</translation> + <translation>Üçüncü parti işlem URL'leri</translation> </message> <message> <source>Active command-line options that override above options:</source> - <translation>Yukarıdaki seçeneklerin yerine geçen faal komut satırı seçenekleri:</translation> + <translation>Yukarıdaki seçeneklerin yerine geçen etkin komut satırı seçenekleri:</translation> </message> <message> <source>Reset all client options to default.</source> @@ -781,11 +1017,11 @@ </message> <message> <source>&Reset Options</source> - <translation>Seçenekleri Sıfı&rla</translation> + <translation>Seçenekleri &Sıfırla</translation> </message> <message> <source>&Network</source> - <translation>&Şebeke</translation> + <translation>&Ağ</translation> </message> <message> <source>(0 = auto, <0 = leave that many cores free)</source> @@ -805,11 +1041,11 @@ </message> <message> <source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source> - <translation>Teyit edilmemiş para üstünü harcamayı devre dışı bırakırsanız, bir muamelenin para üstü bu muamele için en az bir teyit olana dek harcanamaz. Bu, aynı zamanda bakiyenizin nasıl hesaplandığını da etkiler.</translation> + <translation>Doğrulanmamış para üstünü harcamayı devre dışı bırakırsanız, bir işlemin para üstü bu işlem için en az bir doğrulama olana dek harcanamaz. Bu, aynı zamanda bakiyenizin nasıl hesaplandığını da etkiler.</translation> </message> <message> <source>&Spend unconfirmed change</source> - <translation>Teyit edilmemiş para üstünü &harca</translation> + <translation>Doğrulanmamış para üstünü &harca</translation> </message> <message> <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source> @@ -821,15 +1057,15 @@ </message> <message> <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source> - <translation>Bitcoin şebekesine SOCKS5 vekil sunucusu vasıtasıyla bağlan.</translation> + <translation>Bitcoin ağına bir SOCKS5 vekil sunucusu aracılığıyla bağlan.</translation> </message> <message> <source>&Connect through SOCKS5 proxy (default proxy):</source> - <translation>SOCKS5 vekil sunucusu vasıtasıyla &bağlan (varsayılan vekil sunucusu):</translation> + <translation>SOCKS5 vekil sunucusu aracılığıyla &bağlan (varsayılan vekil sunucusu):</translation> </message> <message> <source>Proxy &IP:</source> - <translation>Vekil &İP:</translation> + <translation>Vekil &IP:</translation> </message> <message> <source>&Port:</source> @@ -841,11 +1077,11 @@ </message> <message> <source>Used for reaching peers via:</source> - <translation>Eşlere ulaşmak için kullanılır, şu yoluyla:</translation> + <translation>Eşlere ulaşmak için kullanılır, şu üzerinden:</translation> </message> <message> <source>Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type.</source> - <translation>Bu şebeke türü yoluyla eşlere bağlanmak için belirtilen varsayılan SOCKS5 vekil sunucusunun kullanılıp kullanılmadığını gösterir.</translation> + <translation>Bu ağ türü yoluyla eşlere bağlanmak için belirtilen varsayılan SOCKS5 vekil sunucusunun kullanılıp kullanılmadığını gösterir.</translation> </message> <message> <source>IPv4</source> @@ -861,7 +1097,7 @@ </message> <message> <source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services.</source> - <translation>Bitcoin şebekesine gizli Tor servisleri için ayrı bir SOCKS5 vekil sunucusu vasıtasıyla bağlan.</translation> + <translation>Bitcoin ağına gizli Tor servisleri için ayrı bir SOCKS5 vekil sunucusu aracılığıyla bağlan.</translation> </message> <message> <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source> @@ -873,15 +1109,15 @@ </message> <message> <source>&Hide the icon from the system tray.</source> - <translation>İkonu sistem çekmecesinden &sakla</translation> + <translation>Simgeyi görev çubuğundan &gizle</translation> </message> <message> <source>Hide tray icon</source> - <translation>Sistem çekmecesi ikonunu sakla</translation> + <translation>Görev çubuğu simgesini gizle</translation> </message> <message> <source>Show only a tray icon after minimizing the window.</source> - <translation>Küçültüldükten sonra sadece çekmece ikonu göster.</translation> + <translation>Küçültüldükten sonra sadece tepsi simgesi göster.</translation> </message> <message> <source>&Minimize to the tray instead of the taskbar</source> @@ -905,7 +1141,7 @@ </message> <message> <source>&Unit to show amounts in:</source> - <translation>Meblağları göstermek için &birim:</translation> + <translation>Tutarı göstermek için &birim:</translation> </message> <message> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> @@ -960,7 +1196,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>Görüntülenen veriler zaman aşımına uğramış olabilir. Bağlantı kurulduğunda cüzdanınız otomatik olarak şebeke ile eşleşir ancak bu işlem henüz tamamlanmamıştır.</translation> + <translation>Görüntülenen bilgiler güncel olmayabilir. Bağlantı kurulduğunda cüzdanınız otomatik olarak Bitcoin ağı ile senkronize olur ancak bu işlem henüz tamamlanmamıştır.</translation> </message> <message> <source>Watch-only:</source> @@ -980,7 +1216,7 @@ </message> <message> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source> - <translation>Henüz teyit edilmemiş ve harcanabilir bakiyeye eklenmemiş muamelelerin toplamı</translation> + <translation>Henüz doğrulanmamış ve harcanabilir bakiyeye eklenmemiş işlemlerin toplamı</translation> </message> <message> <source>Immature:</source> @@ -1012,11 +1248,11 @@ </message> <message> <source>Recent transactions</source> - <translation>Son muameleler</translation> + <translation>Son işlemler</translation> </message> <message> <source>Unconfirmed transactions to watch-only addresses</source> - <translation>Sadece izlenen adreslere gelen teyit edilmemiş muameleler</translation> + <translation>Sadece izlenen adreslere gelen doğrulanmamış işlemler</translation> </message> <message> <source>Mined balance in watch-only addresses that has not yet matured</source> @@ -1029,7 +1265,95 @@ </context> <context> <name>PaymentServer</name> - </context> + <message> + <source>Payment request error</source> + <translation>Ödeme talebi hatası</translation> + </message> + <message> + <source>Cannot start bitcoin: click-to-pay handler</source> + <translation>Bitcoin başlatılamadı: tıkla-ve-öde yöneticisi</translation> + </message> + <message> + <source>URI handling</source> + <translation>URI yönetimi</translation> + </message> + <message> + <source>Payment request fetch URL is invalid: %1</source> + <translation>Ödeme talebini alma URL'i geçersiz: %1</translation> + </message> + <message> + <source>Invalid payment address %1</source> + <translation>%1 ödeme adresi geçersizdir</translation> + </message> + <message> + <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source> + <translation>URI ayrıştırılamıyor! Bunun nedeni geçersiz bir Bitcoin adresi veya hatalı biçimlendirilmiş URI değişkenleri olabilir.</translation> + </message> + <message> + <source>Payment request file handling</source> + <translation>Ödeme talebi dosyası yönetimi</translation> + </message> + <message> + <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source> + <translation>Ödeme talebi dosyası okunamıyor! Bunun nedeni geçersiz bir ödeme talebi dosyası olabilir.</translation> + </message> + <message> + <source>Payment request rejected</source> + <translation>Ödeme talebi reddedildi</translation> + </message> + <message> + <source>Payment request network doesn't match client network.</source> + <translation>Ödeme talebi ağı, istemci ağıyla eşleşmiyor.</translation> + </message> + <message> + <source>Payment request expired.</source> + <translation>Ödeme talebinin geçerlilik süresi bitti.</translation> + </message> + <message> + <source>Payment request is not initialized.</source> + <translation>Ödeme talebi başlatılmadı.</translation> + </message> + <message> + <source>Unverified payment requests to custom payment scripts are unsupported.</source> + <translation>Özel ödeme betiklerine, doğrulanmamış ödeme talepleri desteklenmez.</translation> + </message> + <message> + <source>Invalid payment request.</source> + <translation>Geçersiz ödeme talebi.</translation> + </message> + <message> + <source>Requested payment amount of %1 is too small (considered dust).</source> + <translation>Talep edilen %1 ödeme tutarı çok küçüktür (toz olarak kabul edilir).</translation> + </message> + <message> + <source>Refund from %1</source> + <translation>%1 adresinden geri ödeme</translation> + </message> + <message> + <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source> + <translation>%1 ödeme talebi çok büyük (%2 bayt, üst sınır %3 bayt).</translation> + </message> + <message> + <source>Error communicating with %1: %2</source> + <translation>%1 ile iletişimde hata: %2</translation> + </message> + <message> + <source>Payment request cannot be parsed!</source> + <translation>Ödeme talebi ayrıştırılamaz!</translation> + </message> + <message> + <source>Bad response from server %1</source> + <translation>%1 sunucusundan hatalı yanıt</translation> + </message> + <message> + <source>Network request error</source> + <translation>Ağ talebi hatası</translation> + </message> + <message> + <source>Payment acknowledged</source> + <translation>Ödeme kabul edildi</translation> + </message> +</context> <context> <name>PeerTableModel</name> <message> @@ -1040,12 +1364,20 @@ <source>Node/Service</source> <translation>Düğüm/Servis</translation> </message> - </context> + <message> + <source>NodeId</source> + <translation>Düğüm ID'si</translation> + </message> + <message> + <source>Ping</source> + <translation>Ping</translation> + </message> +</context> <context> <name>QObject</name> <message> <source>Amount</source> - <translation>Meblağ</translation> + <translation>Tutar</translation> </message> <message> <source>Enter a Bitcoin address (e.g. %1)</source> @@ -1079,21 +1411,73 @@ <source>%1 ms</source> <translation>%1 ms</translation> </message> + <message numerus="yes"> + <source>%n second(s)</source> + <translation><numerusform>%n saniye</numerusform><numerusform>%n saniye</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n minute(s)</source> + <translation><numerusform>%n dakika</numerusform><numerusform>%n dakika</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n hour(s)</source> + <translation><numerusform>%n saat</numerusform><numerusform>%n saat</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n day(s)</source> + <translation><numerusform>%n gün</numerusform><numerusform>%n gün</numerusform></translation> + </message> + <message numerus="yes"> + <source>%n week(s)</source> + <translation><numerusform>%n hafta</numerusform><numerusform>%n hafta</numerusform></translation> + </message> <message> <source>%1 and %2</source> <translation>%1 ve %2</translation> </message> - </context> + <message numerus="yes"> + <source>%n year(s)</source> + <translation><numerusform>%n yıl</numerusform><numerusform>%n yıl</numerusform></translation> + </message> + <message> + <source>%1 didn't yet exit safely...</source> + <translation>%1 henüz güvenli bir şekilde çıkış yapmamıştır...</translation> + </message> +</context> <context> <name>QObject::QObject</name> - </context> + <message> + <source>Error: Specified data directory "%1" does not exist.</source> + <translation>Hata: Belirtilen "%1" veri klasörü yoktur.</translation> + </message> + <message> + <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source> + <translation>Hata: %1 yapılandırma dosyası ayrıştırılamadı. Sadece anahtar=değer dizimini kullanınız.</translation> + </message> + <message> + <source>Error: %1</source> + <translation>Hata: %1</translation> + </message> +</context> <context> <name>QRImageWidget</name> <message> <source>&Save Image...</source> <translation>Resmi ka&ydet...</translation> </message> - </context> + <message> + <source>&Copy Image</source> + <translation>Resmi &Kopyala</translation> + </message> + <message> + <source>Save QR Code</source> + <translation>QR Kodu Kaydet</translation> + </message> + <message> + <source>PNG Image (*.png)</source> + <translation>PNG Resim (*.png)</translation> + </message> +</context> <context> <name>RPCConsole</name> <message> @@ -1106,7 +1490,7 @@ </message> <message> <source>&Information</source> - <translation>&Malumat</translation> + <translation>&Bilgi</translation> </message> <message> <source>Debug window</source> @@ -1130,7 +1514,7 @@ </message> <message> <source>Network</source> - <translation>Şebeke</translation> + <translation>Ağ</translation> </message> <message> <source>Name</source> @@ -1154,7 +1538,7 @@ </message> <message> <source>Current number of transactions</source> - <translation>Güncel muamele sayısı</translation> + <translation>Güncel işlem sayısı</translation> </message> <message> <source>Memory usage</source> @@ -1198,7 +1582,7 @@ </message> <message> <source>Synced Headers</source> - <translation>Eşleşmiş Başlıklar</translation> + <translation>Eşleşmiş Üstbilgiler</translation> </message> <message> <source>Synced Blocks</source> @@ -1253,6 +1637,10 @@ <translation>Ping Beklemesi</translation> </message> <message> + <source>Min Ping</source> + <translation>En Düşük Ping</translation> + </message> + <message> <source>Time Offset</source> <translation>Saat Farkı</translation> </message> @@ -1270,7 +1658,7 @@ </message> <message> <source>&Network Traffic</source> - <translation>&Şebeke trafiği</translation> + <translation>&Ağ trafiği</translation> </message> <message> <source>&Clear</source> @@ -1313,18 +1701,38 @@ <translation>1 &yıl</translation> </message> <message> + <source>&Disconnect</source> + <translation>&Bağlantıyı Kes</translation> + </message> + <message> + <source>Ban for</source> + <translation>Yasakla</translation> + </message> + <message> + <source>&Unban</source> + <translation>&Yasaklamayı Kaldır</translation> + </message> + <message> <source>Welcome to the %1 RPC console.</source> <translation>%1 RPC konsoluna hoş geldiniz.</translation> </message> <message> <source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source> - <translation>Tarihçede gezinmek için imleç tuşlarını kullanınız, <b>Ctrl-L</b> ile de ekranı temizleyebilirsiniz.</translation> + <translation>Tarihçede gezinmek için aşağı ve yukarı ok tuşlarını kullanınız, <b>Ctrl-L</b> ile de ekranı temizleyebilirsiniz.</translation> </message> <message> <source>Type <b>help</b> for an overview of available commands.</source> <translation>Mevcut komutların listesi için <b>help</b> yazınız.</translation> </message> <message> + <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source> + <translation>UYARI: Bitcoin dolandırıcılarının çok fazla etkin olduğu zamanlarda, dolandırıcılar bazı kullanıcılara buraya komutlar yazmalarını söylerek onların cüzdanlarındaki bitcoinleri çalmışlardır. Bir komutun sonuçlarını tam olarak anlamadan bu konsolu kullanmayın.</translation> + </message> + <message> + <source>Network activity disabled</source> + <translation>Ağ etkinliği devre dışı bırakıldı</translation> + </message> + <message> <source>%1 B</source> <translation>%1 B</translation> </message> @@ -1377,7 +1785,7 @@ <name>ReceiveCoinsDialog</name> <message> <source>&Amount:</source> - <translation>&Meblağ:</translation> + <translation>&Tutar:</translation> </message> <message> <source>&Label:</source> @@ -1385,7 +1793,7 @@ </message> <message> <source>&Message:</source> - <translation>Me&saj:</translation> + <translation>&İleti:</translation> </message> <message> <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source> @@ -1397,7 +1805,7 @@ </message> <message> <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source> - <translation>Talep açıldığında gösterilecek, isteğinize dayalı, ödeme talebi ile ilişkilendirilecek bir mesaj. Not: Bu mesaj ödeme ile birlikte Bitcoin şebekesi üzerinden gönderilmeyecektir.</translation> + <translation>Talep açıldığında gösterilecek, isteğinize dayalı, ödeme talebi ile ilişkilendirilecek bir ileti. Not: Bu ileti ödeme ile birlikte Bitcoin ağı üzerinden gönderilmeyecektir.</translation> </message> <message> <source>An optional label to associate with the new receiving address.</source> @@ -1409,7 +1817,7 @@ </message> <message> <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source> - <translation>Seçiminize dayalı talep edilecek meblağ. Belli bir meblağ talep etmemek için bunu boş bırakın veya sıfır değerini kullanın.</translation> + <translation>Seçiminize dayalı talep edilecek tutar. Belli bir tutar talep etmemek için bunu boş bırakın veya sıfır değerini kullanın.</translation> </message> <message> <source>Clear all fields of the form.</source> @@ -1444,12 +1852,20 @@ <translation>Kaldır</translation> </message> <message> + <source>Copy URI</source> + <translation>URI'yi kopyala</translation> + </message> + <message> <source>Copy label</source> <translation>Etiket kopyala</translation> </message> <message> + <source>Copy message</source> + <translation>İletiyi kopyala</translation> + </message> + <message> <source>Copy amount</source> - <translation>Miktarı kopyala</translation> + <translation>Tutarı kopyala</translation> </message> </context> <context> @@ -1471,25 +1887,73 @@ <translation>Resmi ka&ydet...</translation> </message> <message> + <source>Request payment to %1</source> + <translation>%1 unsuruna ödeme talep et</translation> + </message> + <message> + <source>Payment information</source> + <translation>Ödeme bilgisi</translation> + </message> + <message> + <source>URI</source> + <translation>URI</translation> + </message> + <message> <source>Address</source> <translation>Adres</translation> </message> <message> + <source>Amount</source> + <translation>Tutar</translation> + </message> + <message> <source>Label</source> <translation>Etiket</translation> </message> - </context> + <message> + <source>Message</source> + <translation>İleti</translation> + </message> + <message> + <source>Resulting URI too long, try to reduce the text for label / message.</source> + <translation>Sonuç URI çok uzun, etiket ya da ileti metnini kısaltmayı deneyiniz.</translation> + </message> + <message> + <source>Error encoding URI into QR Code.</source> + <translation>URI'nin QR koduna kodlanmasında hata oluştu.</translation> + </message> +</context> <context> <name>RecentRequestsTableModel</name> <message> + <source>Date</source> + <translation>Tarih</translation> + </message> + <message> <source>Label</source> <translation>Etiket</translation> </message> <message> + <source>Message</source> + <translation>İleti</translation> + </message> + <message> <source>(no label)</source> <translation>(etiket yok)</translation> </message> - </context> + <message> + <source>(no message)</source> + <translation>(ileti yok)</translation> + </message> + <message> + <source>(no amount requested)</source> + <translation>(tutar talep edilmedi)</translation> + </message> + <message> + <source>Requested</source> + <translation>Talep edilen</translation> + </message> +</context> <context> <name>SendCoinsDialog</name> <message> @@ -1522,7 +1986,7 @@ </message> <message> <source>Amount:</source> - <translation>Meblağ:</translation> + <translation>Tutar:</translation> </message> <message> <source>Fee:</source> @@ -1546,7 +2010,7 @@ </message> <message> <source>Transaction Fee:</source> - <translation>Muamele ücreti:</translation> + <translation>İşlem ücreti:</translation> </message> <message> <source>Choose...</source> @@ -1562,11 +2026,11 @@ </message> <message> <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source> - <translation>Eğer özel ücret 1000 satoşi olarak ayarlandıysa ve muamele sadece 250 baytsa, "kilobayt başı" ücret olarak sadece 250 satoşi öder ve "toplam asgari" 1000 satoşi öder. Bir kilobayttan yüksek muameleler için ikisi de kilobayt başı ödeme yapar.</translation> + <translation>Eğer özel ücret 1000 satoşi olarak ayarlandıysa ve işlem sadece 250 baytsa, "kilobayt başı" ücret olarak sadece 250 satoşi öder ve "toplam asgari" 1000 satoşi öder. Bir kilobayttan yüksek işlemler için ikisi de kilobayt başı ödeme yapar.</translation> </message> <message> <source>Hide</source> - <translation>Sakla</translation> + <translation>Gizle</translation> </message> <message> <source>total at least</source> @@ -1574,7 +2038,7 @@ </message> <message> <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source> - <translation>Asgari ücreti ödemek, bloklarda boşluktan daha az muamele hacmi olduğu sürece bir sorun çıkarmaz. Fakat şebekenin işleyecebileceğinden daha çok bitcoin muameleleri talebi olduğunda bunun asla teyit edilmeyen bir muamele olabileceğinin farkında olmalısınız.</translation> + <translation>Gerekli olan en az ücreti ödemek, bloklarda boşluktan daha az işlem hacmi olduğu sürece bir sorun çıkarmaz. Fakat ağın işleyecebileceğinden daha çok bitcoin işlemi talebi olduğunda bunun asla doğrulanmayan bir işlem olabileceğinin farkında olmalısınız.</translation> </message> <message> <source>(read the tooltip)</source> @@ -1617,6 +2081,10 @@ <translation>Toz:</translation> </message> <message> + <source>Confirmation time target:</source> + <translation>Doğrulama süresi hedefi:</translation> + </message> + <message> <source>Clear &All</source> <translation>Tümünü &temizle</translation> </message> @@ -1633,10 +2101,118 @@ <translation>G&önder</translation> </message> <message> - <source>Copy amount</source> + <source>Copy quantity</source> <translation>Miktarı kopyala</translation> </message> <message> + <source>Copy amount</source> + <translation>Tutarı kopyala</translation> + </message> + <message> + <source>Copy fee</source> + <translation>Ücreti kopyala</translation> + </message> + <message> + <source>Copy after fee</source> + <translation>Ücretten sonrasını kopyala</translation> + </message> + <message> + <source>Copy bytes</source> + <translation>Baytları kopyala</translation> + </message> + <message> + <source>Copy dust</source> + <translation>Tozu kopyala</translation> + </message> + <message> + <source>Copy change</source> + <translation>Para üstünü kopyala</translation> + </message> + <message> + <source>%1 to %2</source> + <translation>%1 ögesinden %2 unsuruna</translation> + </message> + <message> + <source>Are you sure you want to send?</source> + <translation>Göndermek istediğinizden emin misiniz?</translation> + </message> + <message> + <source>added as transaction fee</source> + <translation>işlem ücreti olarak eklendi</translation> + </message> + <message> + <source>Total Amount %1</source> + <translation>Toplam Tutar %1</translation> + </message> + <message> + <source>or</source> + <translation>veya</translation> + </message> + <message> + <source>Confirm send coins</source> + <translation>Bitcoin gönderimini onaylayın</translation> + </message> + <message> + <source>The recipient address is not valid. Please recheck.</source> + <translation>Alıcı adresi geçerli değildir. Lütfen tekrar kontrol ediniz.</translation> + </message> + <message> + <source>The amount to pay must be larger than 0.</source> + <translation>Ödeyeceğiniz tutarın 0'dan yüksek olması gerekir.</translation> + </message> + <message> + <source>The amount exceeds your balance.</source> + <translation>Tutar bakiyenizden yüksektir.</translation> + </message> + <message> + <source>The total exceeds your balance when the %1 transaction fee is included.</source> + <translation>Toplam, %1 işlem ücreti eklendiğinde bakiyenizi geçmektedir.</translation> + </message> + <message> + <source>Duplicate address found: addresses should only be used once each.</source> + <translation>Tekrarlayan adres bulundu: adresler sadece bir kez kullanılmalıdır.</translation> + </message> + <message> + <source>Transaction creation failed!</source> + <translation>İşlem oluşturma başarısız!</translation> + </message> + <message> + <source>The transaction was rejected with the following reason: %1</source> + <translation>İşlem şu nedenden dolayı reddedildi: %1</translation> + </message> + <message> + <source>A fee higher than %1 is considered an absurdly high fee.</source> + <translation>%1 tutarından yüksek bir ücret saçma derecede yüksek bir ücret olarak kabul edilir.</translation> + </message> + <message> + <source>Payment request expired.</source> + <translation>Ödeme talebinin geçerlilik süresi bitti.</translation> + </message> + <message numerus="yes"> + <source>%n block(s)</source> + <translation><numerusform>%n blok</numerusform><numerusform>%n blok</numerusform></translation> + </message> + <message> + <source>Pay only the required fee of %1</source> + <translation>Sadece asgari ücret olan %1 tutarını öde</translation> + </message> + <message> + <source>Warning: Invalid Bitcoin address</source> + <translation>Uyarı: geçersiz Bitcoin adresi</translation> + </message> + <message> + <source>Warning: Unknown change address</source> + <translation>Uyarı: Bilinmeyen para üstü adresi</translation> + </message> + <message> + <source>Confirm custom change address</source> + <translation>Özel para üstü adresini onayla</translation> + </message> + <message> + <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source> + <translation>Para üstü için seçtiğiniz adres bu cüzdanın bir parçası değil. Cüzdanınızdaki bir miktar veya tüm para bu adrese gönderilebilir. Emin misiniz?</translation> + </message> + <message> <source>(no label)</source> <translation>(etiket yok)</translation> </message> @@ -1645,7 +2221,7 @@ <name>SendCoinsEntry</name> <message> <source>A&mount:</source> - <translation>Mebla&ğ:</translation> + <translation>T&utar:</translation> </message> <message> <source>Pay &To:</source> @@ -1681,19 +2257,19 @@ </message> <message> <source>Remove this entry</source> - <translation>Bu unsuru kaldır</translation> + <translation>Bu ögeyi kaldır</translation> </message> <message> <source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source> - <translation>Ücret yollanan meblağdan alınacaktır. Alıcı meblağ alanında girdiğinizden daha az bitcoin alacaktır. Eğer birden çok alıcı seçiliyse ücret eşit olarak bölünecektir.</translation> + <translation>Ücret yollanan tutardan alınacaktır. Alıcı tutar alanına girdiğinizden daha az bitcoin alacaktır. Eğer birden çok alıcı seçiliyse ücret eşit olarak bölünecektir.</translation> </message> <message> <source>S&ubtract fee from amount</source> - <translation>Ücreti meblağdan düş</translation> + <translation>Ücreti tutardan düş</translation> </message> <message> <source>Message:</source> - <translation>Mesaj:</translation> + <translation>İleti:</translation> </message> <message> <source>This is an unauthenticated payment request.</source> @@ -1709,7 +2285,7 @@ </message> <message> <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source> - <translation>Bitcoin: URI'siyle ilişkili ve bilginiz için muameleyle saklanacak bir mesaj. Not: Bu mesaj Bitcoin şebekesi üzerinden gönderilmeyecektir.</translation> + <translation>Referans için bitcoin: URI'siyle iliştirilmiş işlemle birlikte depolanacak bir ileti. Not: Bu mesaj Bitcoin ağı üzerinden gönderilmeyecektir.</translation> </message> <message> <source>Pay To:</source> @@ -1719,10 +2295,18 @@ <source>Memo:</source> <translation>Not:</translation> </message> - </context> + <message> + <source>Enter a label for this address to add it to your address book</source> + <translation>Adres defterinize eklemek için bu adrese bir etiket giriniz</translation> + </message> +</context> <context> <name>SendConfirmationDialog</name> - </context> + <message> + <source>Yes</source> + <translation>Evet</translation> + </message> +</context> <context> <name>ShutdownWindow</name> <message> @@ -1738,19 +2322,19 @@ <name>SignVerifyMessageDialog</name> <message> <source>Signatures - Sign / Verify a Message</source> - <translation>İmzalar - Mesaj İmzala / Kontrol et</translation> + <translation>İmzalar - İleti İmzala / Kontrol et</translation> </message> <message> <source>&Sign Message</source> - <translation>Mesaj &imzala</translation> + <translation>İleti &imzala</translation> </message> <message> <source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, 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>Adreslerinize yollanan bitcoinleri alabileceğiniz ispatlamak için adreslerinizle mesaj/anlaşma imzalayabilirsiniz. Oltalama saldırılarının kimliğinizi imzanızla elde etmeyi deneyebilecekleri için belirsiz ya da rastgele hiçbir şey imzalamamaya dikkat ediniz. Sadece ayrıntılı açıklaması olan ve tümüne katıldığınız ifadeleri imzalayınız.</translation> + <translation>Adreslerinize yollanan bitcoinleri alabileceğiniz ispatlamak için adreslerinizle iletiler/anlaşmalar imzalayabilirsiniz. Oltalama saldırılarının kimliğinizi imzanızla elde etmeyi deneyebilecekleri için belirsiz ya da rastgele hiçbir şey imzalamamaya dikkat ediniz. Sadece ayrıntılı açıklaması olan ve tümüne katıldığınız ifadeleri imzalayınız.</translation> </message> <message> <source>The Bitcoin address to sign the message with</source> - <translation>Mesajın imzalanmasında kullanılacak Bitcoin adresi</translation> + <translation>İletinin imzalanmasında kullanılacak Bitcoin adresi</translation> </message> <message> <source>Choose previously used address</source> @@ -1770,7 +2354,7 @@ </message> <message> <source>Enter the message you want to sign here</source> - <translation>İmzalamak istediğiniz mesajı burada giriniz</translation> + <translation>İmzalamak istediğiniz iletiyi burada giriniz</translation> </message> <message> <source>Signature</source> @@ -1782,15 +2366,15 @@ </message> <message> <source>Sign the message to prove you own this Bitcoin address</source> - <translation>Bu Bitcoin adresinin sizin olduğunu ispatlamak için mesajı imzalayın</translation> + <translation>Bu Bitcoin adresinin sizin olduğunu ispatlamak için iletiyi imzalayın</translation> </message> <message> <source>Sign &Message</source> - <translation>&Mesajı imzala</translation> + <translation>&İletiyi imzala</translation> </message> <message> <source>Reset all sign message fields</source> - <translation>Tüm mesaj alanlarını sıfırla</translation> + <translation>Tüm ileti alanlarını sıfırla</translation> </message> <message> <source>Clear &All</source> @@ -1798,29 +2382,81 @@ </message> <message> <source>&Verify Message</source> - <translation>Mesaj &kontrol et</translation> + <translation>İletiyi &kontrol et</translation> </message> <message> <source>Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source> - <translation>Alıcının adresini, mesajı (satır sonları, boşluklar, sekmeler vs. karakterleri tam olarak kopyaladığınızdan emin olunuz) ve imzayı aşağıda giriniz. Bir ortadaki adam saldırısı tarafından kandırılmaya mâni olmak için imzadan, imzalı mesajın içeriğini aşan bir anlam çıkarmamaya dikkat ediniz. Bunun sadece imzalayan tarafın adres ile alım yapabildiğini ispatladığını ve herhangi bir muamelenin gönderi tarafını kanıtlayamayacağını unutmayınız!</translation> + <translation>Alıcının adresini, iletiyi (satır sonları, boşluklar, sekmeler vs. karakterleri tam olarak kopyaladığınızdan emin olunuz) ve imzayı aşağıya giriniz. Bir ortadaki adam saldırısı tarafından kandırılmaya engel olmak için imzadan, imzalı iletinin içeriğini aşan bir anlam çıkarmamaya dikkat ediniz. Bunun sadece imzalayan tarafın adres ile alım yapabildiğini ispatladığını ve herhangi bir işlemin gönderi tarafını kanıtlayamayacağını unutmayınız!</translation> </message> <message> <source>The Bitcoin address the message was signed with</source> - <translation>Mesajın imzalanmasında kullanılan Bitcoin adresi</translation> + <translation>İletinin imzalanmasında kullanılan Bitcoin adresi</translation> </message> <message> <source>Verify the message to ensure it was signed with the specified Bitcoin address</source> - <translation>Belirtilen Bitcoin adresi ile imzalandığını doğrulamak için mesajı kontrol et</translation> + <translation>Belirtilen Bitcoin adresi ile imzalandığını doğrulamak için iletiyi kontrol et</translation> </message> <message> <source>Verify &Message</source> - <translation>&Mesaj kontrol et</translation> + <translation>&İletiyi kontrol et</translation> </message> <message> <source>Reset all verify message fields</source> - <translation>Tüm mesaj kontrolü alanlarını sıfırla</translation> + <translation>Tüm ileti kontrolü alanlarını sıfırla</translation> + </message> + <message> + <source>Click "Sign Message" to generate signature</source> + <translation>İmzayı oluşturmak için "İletiyi İmzala"ya tıklayın</translation> + </message> + <message> + <source>The entered address is invalid.</source> + <translation>Girilen adres geçersizdir.</translation> + </message> + <message> + <source>Please check the address and try again.</source> + <translation>Lütfen adresi kontrol edip tekrar deneyiniz.</translation> + </message> + <message> + <source>The entered address does not refer to a key.</source> + <translation>Girilen adres herhangi bir anahtara işaret etmemektedir.</translation> + </message> + <message> + <source>Wallet unlock was cancelled.</source> + <translation>Cüzdan kilidinin açılması iptal edildi.</translation> + </message> + <message> + <source>Private key for the entered address is not available.</source> + <translation>Girilen adres için özel anahtar mevcut değildir.</translation> + </message> + <message> + <source>Message signing failed.</source> + <translation>İleti imzalaması başarısız oldu.</translation> + </message> + <message> + <source>Message signed.</source> + <translation>İleti imzalandı.</translation> + </message> + <message> + <source>The signature could not be decoded.</source> + <translation>İmzanın kodu çözülemedi.</translation> </message> - </context> + <message> + <source>Please check the signature and try again.</source> + <translation>Lütfen imzayı kontrol edip tekrar deneyiniz.</translation> + </message> + <message> + <source>The signature did not match the message digest.</source> + <translation>İmza iletinin özeti ile eşleşmedi.</translation> + </message> + <message> + <source>Message verification failed.</source> + <translation>İleti doğrulaması başarısız oldu.</translation> + </message> + <message> + <source>Message verified.</source> + <translation>İleti doğrulandı.</translation> + </message> +</context> <context> <name>SplashScreen</name> <message> @@ -1837,28 +2473,368 @@ </context> <context> <name>TransactionDesc</name> - </context> + <message numerus="yes"> + <source>Open for %n more block(s)</source> + <translation><numerusform>%n taneden daha fazla blok için açık</numerusform><numerusform>%n taneden daha fazla blok için açık</numerusform></translation> + </message> + <message> + <source>Open until %1</source> + <translation>%1 değerine dek açık</translation> + </message> + <message> + <source>conflicted with a transaction with %1 confirmations</source> + <translation>%1 doğrulamalı bir işlem ile çelişti</translation> + </message> + <message> + <source>%1/offline</source> + <translation>%1/çevrim dışı</translation> + </message> + <message> + <source>0/unconfirmed, %1</source> + <translation>0/doğrulanmamış, %1</translation> + </message> + <message> + <source>in memory pool</source> + <translation>bellek alanında</translation> + </message> + <message> + <source>not in memory pool</source> + <translation>bellek alanında değil</translation> + </message> + <message> + <source>abandoned</source> + <translation>terk edilmiş</translation> + </message> + <message> + <source>%1/unconfirmed</source> + <translation>%1/doğrulanmadı</translation> + </message> + <message> + <source>%1 confirmations</source> + <translation>%1 doğrulama</translation> + </message> + <message> + <source>Status</source> + <translation>Durum</translation> + </message> + <message> + <source>, has not been successfully broadcast yet</source> + <translation>, henüz başarılı bir şekilde yayınlanmadı</translation> + </message> + <message numerus="yes"> + <source>, broadcast through %n node(s)</source> + <translation><numerusform>, %n düğüm aracılığıyla yayınlandı</numerusform><numerusform>, %n düğüm aracılığıyla yayınlandı</numerusform></translation> + </message> + <message> + <source>Date</source> + <translation>Tarih</translation> + </message> + <message> + <source>Source</source> + <translation>Kaynak</translation> + </message> + <message> + <source>Generated</source> + <translation>Oluşturuldu</translation> + </message> + <message> + <source>From</source> + <translation>Gönderen</translation> + </message> + <message> + <source>unknown</source> + <translation>bilinmiyor</translation> + </message> + <message> + <source>To</source> + <translation>Alıcı</translation> + </message> + <message> + <source>own address</source> + <translation>kendi adresiniz</translation> + </message> + <message> + <source>watch-only</source> + <translation>sadece-izlenen</translation> + </message> + <message> + <source>label</source> + <translation>etiket</translation> + </message> + <message> + <source>Credit</source> + <translation>Alınan Tutar</translation> + </message> + <message numerus="yes"> + <source>matures in %n more block(s)</source> + <translation><numerusform>%n ek blok sonrasında olgunlaşacak</numerusform><numerusform>%n ek blok sonrasında olgunlaşacak</numerusform></translation> + </message> + <message> + <source>not accepted</source> + <translation>kabul edilmedi</translation> + </message> + <message> + <source>Debit</source> + <translation>Çekilen Tutar</translation> + </message> + <message> + <source>Total debit</source> + <translation>Toplam çekilen tutar</translation> + </message> + <message> + <source>Total credit</source> + <translation>Toplam alınan tutar</translation> + </message> + <message> + <source>Transaction fee</source> + <translation>İşlem ücreti</translation> + </message> + <message> + <source>Net amount</source> + <translation>Net tutar</translation> + </message> + <message> + <source>Message</source> + <translation>İleti</translation> + </message> + <message> + <source>Comment</source> + <translation>Yorum</translation> + </message> + <message> + <source>Transaction ID</source> + <translation>İşlem ID'si</translation> + </message> + <message> + <source>Transaction total size</source> + <translation>İşlemin toplam boyutu</translation> + </message> + <message> + <source>Output index</source> + <translation>Çıktı indeksi</translation> + </message> + <message> + <source>Merchant</source> + <translation>Tüccar</translation> + </message> + <message> + <source>Generated coins must mature %1 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, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> + <translation>Oluşturulan bitcoin'lerin harcanabilmelerinden önce %1 blok beklemeleri gerekmektedir. Bu blok, oluşturduğunuzda, blok zincirine eklenmesi için ağda yayınlandı. Zincire eklenmesi başarısız olursa, durumu "kabul edilmedi" olarak değiştirilecek ve harcanamayacaktır. Bu, bazen başka bir düğüm sizden birkaç saniye önce ya da sonra blok oluşturursa meydana gelebilir.</translation> + </message> + <message> + <source>Debug information</source> + <translation>Hata ayıklama bilgisi</translation> + </message> + <message> + <source>Transaction</source> + <translation>İşlem</translation> + </message> + <message> + <source>Inputs</source> + <translation>Girdiler</translation> + </message> + <message> + <source>Amount</source> + <translation>Tutar</translation> + </message> + <message> + <source>true</source> + <translation>doğru</translation> + </message> + <message> + <source>false</source> + <translation>yanlış</translation> + </message> +</context> <context> <name>TransactionDescDialog</name> <message> <source>This pane shows a detailed description of the transaction</source> - <translation>Bu pano muamelenin ayrıntılı açıklamasını gösterir</translation> + <translation>Bu pano işlemin ayrıntılı açıklamasını gösterir</translation> + </message> + <message> + <source>Details for %1</source> + <translation>%1 için ayrıntılar</translation> </message> - </context> +</context> <context> <name>TransactionTableModel</name> <message> + <source>Date</source> + <translation>Tarih</translation> + </message> + <message> + <source>Type</source> + <translation>Tür</translation> + </message> + <message> <source>Label</source> <translation>Etiket</translation> </message> + <message numerus="yes"> + <source>Open for %n more block(s)</source> + <translation><numerusform>%n taneden daha fazla blok için açık</numerusform><numerusform>%n taneden daha fazla blok için açık</numerusform></translation> + </message> + <message> + <source>Open until %1</source> + <translation>%1 değerine dek açık</translation> + </message> + <message> + <source>Offline</source> + <translation>Çevrim dışı</translation> + </message> + <message> + <source>Unconfirmed</source> + <translation>Doğrulanmamış</translation> + </message> + <message> + <source>Abandoned</source> + <translation>Terk edilmiş</translation> + </message> + <message> + <source>Confirming (%1 of %2 recommended confirmations)</source> + <translation>Doğrulanıyor (%1 kere doğrulandı, önerilen doğrulama sayısı %2)</translation> + </message> + <message> + <source>Confirmed (%1 confirmations)</source> + <translation>Doğrulandı (%1 doğrulama)</translation> + </message> + <message> + <source>Conflicted</source> + <translation>Uyuşmadı</translation> + </message> + <message> + <source>Immature (%1 confirmations, will be available after %2)</source> + <translation>Olgunlaşmamış (%1 doğrulama, %2 doğrulama sonra kullanılabilir olacaktır)</translation> + </message> + <message> + <source>This block was not received by any other nodes and will probably not be accepted!</source> + <translation>Bu blok başka hiçbir düğüm tarafından alınmamıştır ve muhtemelen kabul edilmeyecektir!</translation> + </message> + <message> + <source>Generated but not accepted</source> + <translation>Oluşturuldu ama kabul edilmedi</translation> + </message> + <message> + <source>Received with</source> + <translation>Şununla alındı</translation> + </message> + <message> + <source>Received from</source> + <translation>Alındığı kişi</translation> + </message> + <message> + <source>Sent to</source> + <translation>Gönderildiği adres</translation> + </message> + <message> + <source>Payment to yourself</source> + <translation>Kendinize ödeme</translation> + </message> + <message> + <source>Mined</source> + <translation>Madenden çıkarılan</translation> + </message> + <message> + <source>watch-only</source> + <translation>sadece-izlenen</translation> + </message> + <message> + <source>(n/a)</source> + <translation>(mevcut değil)</translation> + </message> <message> <source>(no label)</source> <translation>(etiket yok)</translation> </message> - </context> + <message> + <source>Transaction status. Hover over this field to show number of confirmations.</source> + <translation>İşlem durumu. Doğrulama sayısını görüntülemek için fare imlecini bu alanın üzerinde tutunuz.</translation> + </message> + <message> + <source>Date and time that the transaction was received.</source> + <translation>İşlemin alındığı tarih ve zaman.</translation> + </message> + <message> + <source>Type of transaction.</source> + <translation>İşlemin türü.</translation> + </message> + <message> + <source>Whether or not a watch-only address is involved in this transaction.</source> + <translation>Bu işleme sadece-izlenen bir adresin dahil edilip, edilmediği.</translation> + </message> + <message> + <source>User-defined intent/purpose of the transaction.</source> + <translation>İşlemin kullanıcı tanımlı amacı.</translation> + </message> + <message> + <source>Amount removed from or added to balance.</source> + <translation>Bakiyeden kaldırılan ya da bakiyeye eklenen tutar.</translation> + </message> +</context> <context> <name>TransactionView</name> <message> + <source>All</source> + <translation>Hepsi</translation> + </message> + <message> + <source>Today</source> + <translation>Bugün</translation> + </message> + <message> + <source>This week</source> + <translation>Bu hafta</translation> + </message> + <message> + <source>This month</source> + <translation>Bu ay</translation> + </message> + <message> + <source>Last month</source> + <translation>Geçen ay</translation> + </message> + <message> + <source>This year</source> + <translation>Bu yıl</translation> + </message> + <message> + <source>Range...</source> + <translation>Tarih Aralığı</translation> + </message> + <message> + <source>Received with</source> + <translation>Şununla alındı</translation> + </message> + <message> + <source>Sent to</source> + <translation>Gönderildiği adres</translation> + </message> + <message> + <source>To yourself</source> + <translation>Kendinize</translation> + </message> + <message> + <source>Mined</source> + <translation>Madenden çıkarılan</translation> + </message> + <message> + <source>Other</source> + <translation>Diğer</translation> + </message> + <message> + <source>Enter address or label to search</source> + <translation>Aranacak adres ya da etiket giriniz</translation> + </message> + <message> + <source>Min amount</source> + <translation>En düşük tutar</translation> + </message> + <message> + <source>Abandon transaction</source> + <translation>İşlemden vazgeç</translation> + </message> + <message> <source>Copy address</source> <translation>Adres kopyala</translation> </message> @@ -1868,7 +2844,51 @@ </message> <message> <source>Copy amount</source> - <translation>Miktarı kopyala</translation> + <translation>Tutarı kopyala</translation> + </message> + <message> + <source>Copy transaction ID</source> + <translation>İşlem ID'sini kopyala</translation> + </message> + <message> + <source>Copy raw transaction</source> + <translation>Ham işlemi kopyala</translation> + </message> + <message> + <source>Copy full transaction details</source> + <translation>Tüm işlem ayrıntılarını kopyala</translation> + </message> + <message> + <source>Edit label</source> + <translation>Etiketi düzenle</translation> + </message> + <message> + <source>Show transaction details</source> + <translation>İşlem ayrıntılarını göster</translation> + </message> + <message> + <source>Export Transaction History</source> + <translation>İşlem Tarihçesini Dışarı Aktar</translation> + </message> + <message> + <source>Comma separated file (*.csv)</source> + <translation>Virgülle ayrılmış değerler dosyası (*.csv)</translation> + </message> + <message> + <source>Confirmed</source> + <translation>Doğrulandı</translation> + </message> + <message> + <source>Watch-only</source> + <translation>Sadece izlenen</translation> + </message> + <message> + <source>Date</source> + <translation>Tarih</translation> + </message> + <message> + <source>Type</source> + <translation>Tür</translation> </message> <message> <source>Label</source> @@ -1879,26 +2899,90 @@ <translation>Adres</translation> </message> <message> + <source>ID</source> + <translation>ID</translation> + </message> + <message> <source>Exporting Failed</source> <translation>Dışarı aktarmada hata</translation> </message> - </context> + <message> + <source>There was an error trying to save the transaction history to %1.</source> + <translation>İşlem tarihçesinin %1 konumuna kaydedilmeye çalışıldığı sırada bir hata meydana geldi.</translation> + </message> + <message> + <source>Exporting Successful</source> + <translation>Dışarı Aktarma Başarılı</translation> + </message> + <message> + <source>The transaction history was successfully saved to %1.</source> + <translation>İşlem tarihçesi %1 konumuna başarıyla kaydedildi.</translation> + </message> + <message> + <source>Range:</source> + <translation>Tarih Aralığı:</translation> + </message> + <message> + <source>to</source> + <translation>Alıcı</translation> + </message> +</context> <context> <name>UnitDisplayStatusBarControl</name> <message> <source>Unit to show amounts in. Click to select another unit.</source> - <translation>Meblağları göstermek için birim. Başka bir birim seçmek için tıklayınız.</translation> + <translation>Tutarı göstermek için birim. Başka bir birim seçmek için tıklayınız.</translation> </message> </context> <context> <name>WalletFrame</name> - </context> + <message> + <source>No wallet has been loaded.</source> + <translation>Hiçbir cüzdan yüklenmedi.</translation> + </message> +</context> <context> <name>WalletModel</name> - </context> + <message> + <source>Send Coins</source> + <translation>Bitcoini Gönder</translation> + </message> +</context> <context> <name>WalletView</name> - </context> + <message> + <source>&Export</source> + <translation>&Dışarı aktar</translation> + </message> + <message> + <source>Export the data in the current tab to a file</source> + <translation>Mevcut sekmedeki verileri bir dosyaya aktar</translation> + </message> + <message> + <source>Backup Wallet</source> + <translation>Cüzdanı Yedekle</translation> + </message> + <message> + <source>Wallet Data (*.dat)</source> + <translation>Cüzdan Verileri (*.dat)</translation> + </message> + <message> + <source>Backup Failed</source> + <translation>Yedekleme Başarısız Oldu</translation> + </message> + <message> + <source>There was an error trying to save the wallet data to %1.</source> + <translation>Cüzdan verilerinin %1 konumuna kaydedilmesi sırasında bir hata meydana geldi.</translation> + </message> + <message> + <source>Backup Successful</source> + <translation>Yedekleme Başarılı</translation> + </message> + <message> + <source>The wallet data was successfully saved to %1.</source> + <translation>Cüzdan verileri %1 konumuna başarıyla kaydedildi.</translation> + </message> +</context> <context> <name>bitcoin-core</name> <message> @@ -1922,12 +3006,24 @@ <translation>Komut satırı ve JSON-RPC komutlarını kabul et</translation> </message> <message> + <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source> + <translation>Dışarıdan gelen bağlantıları kabul et (varsayılan: 1 eğer -proxy veya -connect/-noconnect yoksa)</translation> + </message> + <message> + <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source> + <translation>-noconnect ile yalnızca belirtilen düğümleri bağlayın veya yalnız otomatik bağlantıları devre dışı bırakmak için -connect=0 kullanın.</translation> + </message> + <message> + <source>Distributed under the MIT software license, see the accompanying file %s or %s</source> + <translation>MIT yazılım lisansı altında dağıtılmıştır, beraberindeki %s ya da %s dosyasına bakınız.</translation> + </message> + <message> <source>If <category> is not supplied or if <category> = 1, output all debugging information.</source> - <translation>Eğer <kategori> belirtilmemişse ya da <kategori> = 1 ise, tüm hata ayıklama verilerini dök.</translation> + <translation>Eğer <kategori> belirtilmemişse ya da <kategori> = 1 ise, tüm hata ayıklama verilerini çıktı al.</translation> </message> <message> <source>Prune configured below the minimum of %d MiB. Please use a higher number.</source> - <translation>Budama, asgari değer olan %d MiB'den düşük olarak ayarlanmıştır. Lütfen daha yüksek bir sayı kullanınız.</translation> + <translation>Budama, en düşük değer olan %d MiB'den düşük olarak ayarlanmıştır. Lütfen daha yüksek bir sayı kullanınız.</translation> </message> <message> <source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source> @@ -1943,7 +3039,7 @@ </message> <message> <source>Fee (in %s/kB) to add to transactions you send (default: %s)</source> - <translation>Yolladığınız muamelelere eklenecek ücret (%s/kB olarak) (varsayılan: %s)</translation> + <translation>Yolladığınız işlemlere eklenecek ücret (%s/kB olarak) (varsayılan: %s)</translation> </message> <message> <source>Pruning blockstore...</source> @@ -1971,7 +3067,7 @@ </message> <message> <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source> - <translation>Muameleler aktarılmadığında dahi beyaz listedeki eşlerden aktarılan muameleleri kabul et (varsayılan: %d)</translation> + <translation>İşlemler aktarılmadığında dahi beyaz listedeki eşlerden aktarılan işlemleri kabul et (varsayılan: %d)</translation> </message> <message> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> @@ -1983,7 +3079,7 @@ </message> <message> <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source> - <translation>Tüm cüzdan muamelelerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation> + <translation>Tüm cüzdan işlemlerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation> </message> <message> <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source> @@ -1991,19 +3087,27 @@ </message> <message> <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> - <translation>%s dosyasının okunması sırasında bir hata meydana geldi! Tüm anahtarlar doğru bir şekilde okundu, ancak muamele verileri ya da adres defteri unsurları hatalı veya eksik olabilir.</translation> + <translation>%s dosyasının okunması sırasında bir hata meydana geldi! Tüm anahtarlar doğru bir şekilde okundu, ancak işlem verileri ya da adres defteri ögeleri hatalı veya eksik olabilir.</translation> </message> <message> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> - <translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir)</translation> + <translation>Bir cüzdan işlemi değiştiğinde komutu çalıştır (komuttaki %s işlem kimliği ile değiştirilecektir)</translation> + </message> + <message> + <source>Extra transactions to keep in memory for compact block reconstructions (default: %u)</source> + <translation>Daha küçük boyutlu blok yeniden yapılandırması için fazladan işlemleri bellekte tut. (varsayılan: %u)</translation> + </message> + <message> + <source>If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)</source> + <translation>Eğer bu blok zincirde yer alıyorsa onun ve atalarının geçerli olduğunu varsay ve potansiyel olarak onların betik doğrulamasını atla. (Tümünü doğrulamak için 0, varsayılan %s, testnet: %s)</translation> </message> <message> <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source> - <translation>Müsaade edilen azami medyan eş zamanı değişiklik sınırının ayarlaması. Zamanın yerel perspektifi bu miktar kadar ileri ya da geri eşler tarafından etkilenebilir. (Varsayılan %u saniye)</translation> + <translation>İzin verilen edilen en yüksek medyan eş zamanı değişiklik sınırının ayarlaması. Zamanın yerel perspektifi bu miktar kadar ileri ya da geri eşler tarafından etkilenebilir. (Varsayılan %u saniye)</translation> </message> <message> <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source> - <translation>Tek cüzdan muamelesinde ya da ham muamelede kullanılacak azami toplam ücret (%s olarak); bunu çok düşük olarak ayarlamak büyük muameleleri iptal edebilir (varsayılan: %s)</translation> + <translation>Tek bir cüzdan işleminde ya da ham işlemde kullanılacak en yüksek toplam ücret (%s olarak); bunu çok düşük olarak ayarlamak büyük işlemleri iptal edebilir (varsayılan: %s)</translation> </message> <message> <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source> @@ -2014,6 +3118,14 @@ <translation>%s programını faydalı buluyorsanız lütfen katkıda bulununuz. Yazılım hakkında daha fazla bilgi için %s adresini ziyaret ediniz.</translation> </message> <message> + <source>Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)</source> + <translation>Eski blokları budamayı (silme) etkinleştirerek depolama gereksinimlerini azaltın. Bu belirli blokları silmek için pruneblockchain uzak yordam çağrısına (RPC) izin verir. Eğer bloklar hedef mebibyte boyutuna ulaşırsa eski blokların otomatik olarak budanmasını sağlar. Bu kip, -txindex ve -rescan ile uyumsuzdur. Uyarı: Bu ayarı geri almak, blok zincirinin tamamını yeniden yüklemeyi gerektirir. (varsayılan: 0 = blok budaması devre dışı, 1 = RPC üzerinden manuel budamaya izin verir, >%u = mebibyte olarak belirtilen hedef boyutun altında kalması için blok dosyalarını otomatik olarak budar)</translation> + </message> + <message> + <source>Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)</source> + <translation>Blok oluşturmaya dahil olan işlemler için en düşük ücret oranını (%s/kB olarak) ayarla. (varsayılan: %s)</translation> + </message> + <message> <source>Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)</source> <translation>Betik kontrolü iş parçacıklarının sayısını belirler (%u ilâ %d, 0 = otomatik, <0 = bu sayıda çekirdeği kullanma, varsayılan: %d)</translation> </message> @@ -2022,6 +3134,10 @@ <translation>Blok veritabanı gelecekten gibi görünen bir blok içermektedir. Bu, bilgisayarınızın saat ve tarihinin yanlış ayarlanmış olmasından kaynaklanabilir. Blok veritabanını sadece bilgisayarınızın tarih ve saatinin doğru olduğundan eminseniz yeniden derleyin.</translation> </message> <message> + <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> + <translation>Bu kararlı sürümden önceki bir deneme sürümüdür. - risklerini bilerek kullanma sorumluluğu sizdedir - bitcoin oluşturmak ya da ticari uygulamalar için kullanmayınız</translation> + </message> + <message> <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source> <translation>Veritabanını çatallama öncesi duruma geri sarmak mümkün değil. Blok zincirini tekrar indirmeniz gerekmektedir</translation> </message> @@ -2030,6 +3146,22 @@ <translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: dinlenildiğinde ve -proxy olmadığında 1)</translation> </message> <message> + <source>Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times</source> + <translation>JSON-RPC bağlantıları için kullanıcı adı ve karmalanmış parola. <userpw> alanı şu biçimdedir: <KULLANICI ADI>:<SALT>$<HASH>. Kanonik bir Python betiği share/rpcuser klasöründe bulunabilir. Ardından istemci normal şekilde rpcuser=<KULLANICI ADI>/rpcpassword=<PAROLA> argüman çiftini kullanarak bağlanabilir. Bu seçenek birden çok kez belirtilebilir.</translation> + </message> + <message> + <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source> + <translation>Cüzdan, zincir bellek alanı limitlerini ihlal eden işlem oluşturmayacak. (varsayılan: %u)</translation> + </message> + <message> + <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source> + <translation>Uyarı: Ağ üyeleri aralarında tamamen anlaşmış gibi gözükmüyor! Bazı madenciler sorun yaşıyor gibi görünmektedir.</translation> + </message> + <message> + <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source> + <translation>Uyarı: Ağ eşlerimizle tamamen anlaşamamışız gibi görünüyor! Güncelleme yapmanız gerekebilir ya da diğer düğümlerin güncelleme yapmaları gerekebilir.</translation> + </message> + <message> <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source> <translation>-txindex'i değiştirmek için veritabanını -reindex-chainstate kullanarak tekrar inşa etmeniz gerekmektedir</translation> </message> @@ -2039,7 +3171,7 @@ </message> <message> <source>-maxmempool must be at least %d MB</source> - <translation>-maxmempool asgari %d MB olmalıdır</translation> + <translation>-maxmempool en az %d MB olmalıdır</translation> </message> <message> <source><category> can be:</source> @@ -2062,8 +3194,12 @@ <translation>Çözümlenemedi - %s adres: '%s'</translation> </message> <message> + <source>Chain selection options:</source> + <translation>Blok zinciri seçim ayarları:</translation> + </message> + <message> <source>Change index out of range</source> - <translation>Aralık dışında değişiklik endeksi</translation> + <translation>Aralık dışında değişiklik indeksi</translation> </message> <message> <source>Connection options:</source> @@ -2095,7 +3231,7 @@ </message> <message> <source>Enable publish hash transaction in <address></source> - <translation>Karma değer muamelesinin <adres>te yayınlanmasını etkinleştir</translation> + <translation>Karma değer işleminin <adres>te yayınlanmasını etkinleştir</translation> </message> <message> <source>Enable publish raw block in <address></source> @@ -2103,11 +3239,11 @@ </message> <message> <source>Enable publish raw transaction in <address></source> - <translation>Ham muamelenin <adres>te yayınlanmasını etkinleştir</translation> + <translation>Ham işlemin <adres>te yayınlanmasını etkinleştir</translation> </message> <message> <source>Enable transaction replacement in the memory pool (default: %u)</source> - <translation>Bellek alanında muamele değiştirmeyi etkinleştir (varsayılan: %u)</translation> + <translation>Bellek alanında işlem değiştirmeyi etkinleştir (varsayılan: %u)</translation> </message> <message> <source>Error initializing block database</source> @@ -2155,7 +3291,7 @@ </message> <message> <source>Incorrect or no genesis block found. Wrong datadir for network?</source> - <translation>Yanlış ya da bulunamamış doğuş bloku. Şebeke için yanlış veri klasörü mü?</translation> + <translation>Yanlış ya da bulunamamış doğuş bloğu. Ağ için yanlış veri klasörü mü?</translation> </message> <message> <source>Initialization sanity check failed. %s is shutting down.</source> @@ -2167,15 +3303,15 @@ </message> <message> <source>Invalid amount for -%s=<amount>: '%s'</source> - <translation>-%s=<meblağ> için geçersiz meblağ: '%s'</translation> + <translation>-%s=<tutar> için geçersiz tutar: '%s'</translation> </message> <message> <source>Invalid amount for -fallbackfee=<amount>: '%s'</source> - <translation> -fallbackfee=<meblağ> için geçersiz meblağ: '%s'</translation> + <translation> -fallbackfee=<tutar> için geçersiz tutar: '%s'</translation> </message> <message> <source>Keep the transaction memory pool below <n> megabytes (default: %u)</source> - <translation>Muamele bellek alanını <n> megabayttan düşük tut (varsayılan: %u)</translation> + <translation>İşlem bellek alanını <n> megabayttan düşük tut (varsayılan: %u)</translation> </message> <message> <source>Loading banlist...</source> @@ -2191,7 +3327,7 @@ </message> <message> <source>Only connect to nodes in network <net> (ipv4, ipv6 or onion)</source> - <translation>Sadece <net> şebekesindeki düğümlere bağlan (ipv4, ipv6 veya onion)</translation> + <translation>Sadece <net> ağındaki düğümlere bağlan (ipv4, ipv6 veya onion)</translation> </message> <message> <source>Print this help message and exit</source> @@ -2211,11 +3347,11 @@ </message> <message> <source>Rebuild chain state and block index from the blk*.dat files on disk</source> - <translation>Zincir durumu ve blok endeksini diskteki blk*.dat dosyalarından yeniden derle</translation> + <translation>Zincir durumu ve blok indeksini diskteki blk*.dat dosyalarından yeniden derle</translation> </message> <message> <source>Rebuild chain state from the currently indexed blocks</source> - <translation>Zincir durumunu güncel olarak endekslenen bloklardan yeniden derle</translation> + <translation>Zincir durumunu güncel olarak indekslenen bloklardan yeniden derle</translation> </message> <message> <source>Rewinding blocks...</source> @@ -2227,7 +3363,7 @@ </message> <message> <source>Set maximum block size in bytes (default: %d)</source> - <translation>Azami blok boyutunu bayt olarak ayarla (varsayılan: %d)</translation> + <translation>En yüksek blok boyutunu bayt olarak ayarla (varsayılan: %d)</translation> </message> <message> <source>Specify wallet file (within data directory)</source> @@ -2258,6 +3394,10 @@ <translation>Dinleme portunu haritalamak için UPnP kullan (varsayılan: %u)</translation> </message> <message> + <source>Use the test chain</source> + <translation>Test blok zincirini kullan</translation> + </message> + <message> <source>User Agent comment (%s) contains unsafe characters.</source> <translation>Kullanıcı Aracı açıklaması (%s) güvensiz karakterler içermektedir.</translation> </message> @@ -2287,7 +3427,7 @@ </message> <message> <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>Belirtilen kaynaktan JSON-RPC bağlantılarını kabul et. Bir <ip> için geçerli olanlar şunlardır: salt IP adresi (mesela 1.2.3.4), bir şebeke/ağ maskesi (örneğin 1.2.3.4/255.255.255.0) ya da bir şebeke/CIDR (mesela 1.2.3.4/24). Bu seçenek birden fazla kez belirtilebilir</translation> + <translation>Belirtilen kaynaktan JSON-RPC bağlantılarını kabul et. Bir <ip> için geçerli olanlar şunlardır: IP adresi (mesela 1.2.3.4), bir ağ/ağ maskesi (örneğin 1.2.3.4/255.255.255.0) ya da bir ağ/CIDR (mesela 1.2.3.4/24). Bu seçenek birden fazla kez belirtilebilir</translation> </message> <message> <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source> @@ -2315,19 +3455,19 @@ </message> <message> <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source> - <translation>Bundan düşük ücretler (%s/kB olarak) aktarma, oluşturma ve muamele yaratma için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation> + <translation>Bundan düşük ücretler (%s/kB olarak) aktarma, oluşturma ve işlem yaratma için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation> </message> <message> <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source> - <translation>Eğer paytxfee ayarlanmadıysa kafi derecede ücret ekleyin ki muameleler teyite vasati n blok içinde başlasın (varsayılan: %u)</translation> + <translation>Eğer paytxfee ayarlanmadıysa kafi derecede ücret ekleyin ki işlemler teyite vasati n blok içinde başlasın (varsayılan: %u)</translation> </message> <message> <source>Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source> - <translation>-maxtxfee=<tutar> için geçersiz tutar: '%s' (Sıkışmış muameleleri önlemek için en az %s değerinde asgari aktarım ücretine eşit olmalıdır)</translation> + <translation>-maxtxfee=<tutar> için geçersiz tutar: '%s' (Sıkışmış işlemleri önlemek için en az %s değerinde en düşük aktarım ücretine eşit olmalıdır)</translation> </message> <message> <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source> - <translation>Aktardığımız ve oluşturduğumuz veri taşıyıcı muamelelerindeki azami veri boyutu (varsayılan: %u)</translation> + <translation>Aktardığımız ve oluşturduğumuz veri taşıyıcı işlemlerindeki en yüksek veri boyutu (varsayılan: %u)</translation> </message> <message> <source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source> @@ -2335,11 +3475,11 @@ </message> <message> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source> - <translation>Yüksek öncelikli/düşük ücretli muamelelerin azami boyutunu bayt olarak ayarla (varsayılan: %d)</translation> + <translation>Yüksek öncelikli/düşük ücretli işlemlerin en yüksek boyutunu bayt olarak ayarla (varsayılan: %d)</translation> </message> <message> <source>The transaction amount is too small to send after the fee has been deducted</source> - <translation>Bu muamele, ücret düşüldükten sonra göndermek için çok düşük</translation> + <translation>Bu işlem, tutar düşüldükten sonra göndermek için çok düşük</translation> </message> <message> <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source> @@ -2347,7 +3487,7 @@ </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>Beyaz listeye alınan eşler DoS yasaklamasına uğramazlar ve muameleleri zaten mempool'da olsalar da daima aktarılır, bu mesela bir geçit için kullanışlıdır</translation> + <translation>Beyaz listeye alınan eşler DoS yasaklamasına uğramazlar ve işlemleri zaten mempool'da olsalar da daima aktarılır, bu mesela bir geçit için kullanışlıdır</translation> </message> <message> <source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source> @@ -2391,7 +3531,7 @@ </message> <message> <source>Keep at most <n> unconnectable transactions in memory (default: %u)</source> - <translation>Hafızada en çok <n> bağlanılamaz muamele tut (varsayılan: %u)</translation> + <translation>Hafızada en çok <n> bağlanılamaz işlem tut (varsayılan: %u)</translation> </message> <message> <source>Need to specify a port with -whitebind: '%s'</source> @@ -2399,7 +3539,7 @@ </message> <message> <source>Node relay options:</source> - <translation>Düğüm röle seçenekleri:</translation> + <translation>Düğüm aktarma seçenekleri:</translation> </message> <message> <source>RPC server options:</source> @@ -2411,15 +3551,15 @@ </message> <message> <source>Rescan the block chain for missing wallet transactions on startup</source> - <translation>Başlangıçta blok zincirini eksik cüzdan muameleleri için tekrar tara</translation> + <translation>Başlangıçta blok zincirini eksik cüzdan işlemleri için tekrar tara</translation> </message> <message> <source>Send trace/debug info to console instead of debug.log file</source> - <translation>Trace/hata ayıklama verilerini debug.log dosyası yerine konsola gönder</translation> + <translation>İzleme/hata ayıklama verilerini debug.log dosyası yerine konsola gönder</translation> </message> <message> <source>Send transactions as zero-fee transactions if possible (default: %u)</source> - <translation>Muameleleri mümkünse ücretsiz olarak gönder (varsayılan: %u)</translation> + <translation>İşlemleri mümkünse ücretsiz olarak gönder (varsayılan: %u)</translation> </message> <message> <source>Show all debugging options (usage: --help -help-debug)</source> @@ -2431,11 +3571,11 @@ </message> <message> <source>Signing transaction failed</source> - <translation>Muamelenin imzalanması başarısız oldu</translation> + <translation>İşlemin imzalanması başarısız oldu</translation> </message> <message> <source>The transaction amount is too small to pay the fee</source> - <translation>Muamele meblağı ücreti ödemek için çok düşük</translation> + <translation>İşlemdeki bitcoin tutarı ücreti ödemek için çok düşük</translation> </message> <message> <source>This is experimental software.</source> @@ -2447,23 +3587,23 @@ </message> <message> <source>Tor control port to use if onion listening enabled (default: %s)</source> - <translation>Eğer onion dinlenmesi etkinse kullanılacak Tor kontrol portu (varsayılan: %s)</translation> + <translation>Eğer onion dinlemesi etkinse kullanılacak Tor kontrol portu (varsayılan: %s)</translation> </message> <message> <source>Transaction amount too small</source> - <translation>Muamele meblağı çok düşük</translation> + <translation>İşlem tutarı çok düşük</translation> </message> <message> <source>Transaction too large for fee policy</source> - <translation>Ücret politikası için çok büyük muamele</translation> + <translation>Ücret politikası için işlem çok büyük</translation> </message> <message> <source>Transaction too large</source> - <translation>Muamele çok büyük</translation> + <translation>İşlem çok büyük</translation> </message> <message> <source>Unable to bind to %s on this computer (bind returned error %s)</source> - <translation>Bu bilgisayarda %s unsuruna bağlanılamadı (bağlanma %s hatasını verdi)</translation> + <translation>Bu bilgisayarda %s ögesine bağlanılamadı (bağlanma %s hatasını verdi)</translation> </message> <message> <source>Upgrade wallet to latest format on startup</source> @@ -2479,15 +3619,15 @@ </message> <message> <source>Warning: unknown new rules activated (versionbit %i)</source> - <translation>İkaz: bilinmeyen yeni kurallar etkinleştirilmiştir (versionbit %i)</translation> + <translation>Uyarı: bilinmeyen yeni kurallar etkinleştirilmiştir (versionbit %i)</translation> </message> <message> <source>Whether to operate in a blocks only mode (default: %u)</source> - <translation>Salt blok kipinde çalışılıp çalışılmayacağı (varsayılan: %u)</translation> + <translation>Sadece blok kipinde çalışılıp çalışılmayacağı (varsayılan: %u)</translation> </message> <message> <source>Zapping all transactions from wallet...</source> - <translation>Cüzdandaki tüm muameleler kaldırılıyor...</translation> + <translation>Cüzdandaki tüm işlemler kaldırılıyor...</translation> </message> <message> <source>ZeroMQ notification options:</source> @@ -2515,19 +3655,23 @@ </message> <message> <source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source> - <translation>-maxtxfee çok yüksek bir değere ayarlanmış! Bu denli yüksek ücretler tek bir muamelede ödenebilir.</translation> + <translation>-maxtxfee çok yüksek bir değere ayarlanmış! Bu denli yüksek ücretler tek bir işlemde ödenebilir.</translation> </message> <message> <source>Do not keep transactions in the mempool longer than <n> hours (default: %u)</source> - <translation>Muameleleri bellek alanında <n> saatten fazla tutma (varsayılan: %u)</translation> + <translation>İşlemleri bellek alanında <n> saatten fazla tutma (varsayılan: %u)</translation> </message> <message> <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source> - <translation>Oluşturma ve aktarşa muamelelerinde sigop başına eşdeğer bayt (varsayılan: %u)</translation> + <translation>Oluşturma ve aktarma işlemlerinde sigop başına eşdeğer bayt (varsayılan: %u)</translation> </message> <message> <source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source> - <translation>Bundan düşük ücretler (%s/kB olarak) muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation> + <translation>Bundan düşük ücretler (%s/kB olarak) işlem oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation> + </message> + <message> + <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source> + <translation>Yerel aktarma politikasını ihlal etseler bile beyaz listedeki eşlerden gelen işlemlerin aktarılmasını zorla (varsayılan: %d)</translation> </message> <message> <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source> @@ -2535,7 +3679,7 @@ </message> <message> <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source> - <translation>Muamelelerin tamamının indeksini tut, getrawtransaction rpc çağrısı tarafından kullanılır (varsayılan: %u)</translation> + <translation>İşlemlerin tamamının indeksini tut, getrawtransaction rpc çağrısı tarafından kullanılır (varsayılan: %u)</translation> </message> <message> <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source> @@ -2543,15 +3687,31 @@ </message> <message> <source>Output debugging information (default: %u, supplying <category> is optional)</source> - <translation>Hata ayıklama bilgisi dök (varsayılan: %u, <kategori> sağlanması seçime dayalıdır)</translation> + <translation>Hata ayıklama bilgisini dök (varsayılan: %u, <kategori> sağlanması seçime dayalıdır)</translation> + </message> + <message> + <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source> + <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect/-noconnect kullanılmadıysa)</translation> + </message> + <message> + <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source> + <translation>Ham işlemin serileştirilmesini ayarlar veya blok non-verbose, non-segwit(0) veya segwit(1) kipinde onaltılık değeri döndürür (default: %d)</translation> </message> <message> <source>Support filtering of blocks and transaction with bloom filters (default: %u)</source> - <translation>Blokların ve muamelelerin bloom filtreleri ile süzülmesini destekle (varsayılan: %u)</translation> + <translation>Blokların ve işlemlerin bloom filtreleri ile süzülmesini destekle (varsayılan: %u)</translation> + </message> + <message> + <source>This is the transaction fee you may pay when fee estimates are not available.</source> + <translation>İşlem ücret tahminleri mevcut olmadığında ödeyebileceğiniz işlem ücreti budur.</translation> + </message> + <message> + <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source> + <translation>Bu ürün OpenSSL Projesi tarafından geliştirilen OpenSSL araç takımınında kullanılmak üzere yazılan yazılımları %s Eric Young tarafından yazılmış şifreleme yazılımını ve Thomas Bernard tarafından yazılmış UPnP yazılımını içerir.</translation> </message> <message> <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source> - <translation>Şebeke sürümü zincirinin toplam boyutu (%i) azami boyutu geçmektedir (%i). Kullanıcı aracı açıklamasının sayısı veya boyutunu azaltınız.</translation> + <translation>Ağ sürümü zincirinin toplam boyutu (%i) en yüksek boyutu geçmektedir (%i). Kullanıcı aracı açıklamasının sayısı veya boyutunu azaltınız.</translation> </message> <message> <source>Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)</source> @@ -2571,11 +3731,19 @@ </message> <message> <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source> - <translation>İkaz: bilinmeyen blok sürümü oluşturulmaya çalışılıyor. Bilinmeyen kuralların işlemesi mümkündür.</translation> + <translation>Uyarı: Bilinmeyen blok sürümü oluşturulmaya çalışılıyor. Bilinmeyen kuralların işlemesi mümkündür.</translation> </message> <message> <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source> - <translation>Uyarı: wallet.dat bozuk, veriler geri kazanıldı! Özgün %s, %s olarak %s klasörüne kaydedildi; bakiyeniz ya da muameleleriniz yanlışsa bir yedeklemeden tekrar yüklemeniz gerekir.</translation> + <translation>Uyarı: wallet.dat bozuk, veriler geri kazanıldı! Özgün %s, %s olarak %s klasörüne kaydedildi; bakiyeniz ya da işlemleriniz yanlışsa bir yedeklemeden tekrar yüklemeniz gerekir.</translation> + </message> + <message> + <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source> + <translation>Beyaz listeye eklenen eşler verilen IP adresinden (ör. 1.2.3.4) veya CIDR ağından (ör. 1.2.3.0/24) bağlanabilir. Değerler birden çok kez kullanılabilir.</translation> + </message> + <message> + <source>%s is set very high!</source> + <translation>%s çok yüksek ayarlanmış!</translation> </message> <message> <source>(default: %s)</source> @@ -2598,6 +3766,10 @@ <translation>Geçersiz -proxy adresi: '%s'</translation> </message> <message> + <source>Keypool ran out, please call keypoolrefill first</source> + <translation>Keypool tükendi, lütfen önce keypoolrefill'i çağırın</translation> + </message> + <message> <source>Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)</source> <translation>JSON-RPC bağlantılarını <port> üzerinde dinle (varsayılan: %u veya tesnet: %u)</translation> </message> @@ -2611,15 +3783,15 @@ </message> <message> <source>Make the wallet broadcast transactions</source> - <translation>Cüzdanın muameleleri yayınlamasını sağla</translation> + <translation>Cüzdanın işlemleri yayınlamasını sağla</translation> </message> <message> <source>Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)</source> - <translation>Her bağlantı için azami alım tamponu, <n>*1000 bayt (varsayılan: %u)</translation> + <translation>Her bağlantı için en yüksek alım tamponu, <n>*1000 bayt (varsayılan: %u)</translation> </message> <message> <source>Maximum per-connection send buffer, <n>*1000 bytes (default: %u)</source> - <translation>Her bağlantı için azami yollama tamponu, <n>*1000 bayt (varsayılan: %u)</translation> + <translation>Her bağlantı için çok gönderme tamponu, <n>*1000 bayt (varsayılan: %u)</translation> </message> <message> <source>Prepend debug output with timestamp (default: %u)</source> @@ -2627,19 +3799,23 @@ </message> <message> <source>Relay and mine data carrier transactions (default: %u)</source> - <translation>Veri taşıyıcı muameleleri oluştur ve aktar (varsayılan: %u)</translation> + <translation>Veri taşıyıcı işlemleri oluştur ve aktar (varsayılan: %u)</translation> </message> <message> <source>Relay non-P2SH multisig (default: %u)</source> <translation>P2SH olmayan çoklu imzaları aktar (varsayılan: %u)</translation> </message> <message> + <source>Send transactions with full-RBF opt-in enabled (default: %u)</source> + <translation>İşlemleri full-RBF opt-in ile gönder etkinleştirildi (default: %u)</translation> + </message> + <message> <source>Set key pool size to <n> (default: %u)</source> <translation>Anahtar alan boyutunu <n> değerine ayarla (varsayılan: %u)</translation> </message> <message> <source>Set maximum BIP141 block weight (default: %d)</source> - <translation>Azami BIP141 blok ağırlığını ayarla (varsayılan: %d)</translation> + <translation>En yüksek BIP141 blok ağırlığını ayarla (varsayılan: %d)</translation> </message> <message> <source>Set the number of threads to service RPC calls (default: %d)</source> @@ -2651,7 +3827,7 @@ </message> <message> <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source> - <translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (asgari: 1, varsayılan: %d)</translation> + <translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (en düşüki: 1, varsayılan: %d)</translation> </message> <message> <source>Specify pid file (default: %s)</source> @@ -2659,15 +3835,43 @@ </message> <message> <source>Spend unconfirmed change when sending transactions (default: %u)</source> - <translation>Gönderme muamelelerinde teyit edilmemiş para üstünü harca (varsayılan: %u)</translation> + <translation>Gönderme işlemlerinde doğrulanmamış para üstünü harca (varsayılan: %u)</translation> + </message> + <message> + <source>Starting network threads...</source> + <translation>Ağ iş parçacıkları başlatılıyor...</translation> + </message> + <message> + <source>The wallet will avoid paying less than the minimum relay fee.</source> + <translation>Cüzdan en az aktarma ücretinden daha az ödeme yapmaktan sakınacaktır.</translation> + </message> + <message> + <source>This is the minimum transaction fee you pay on every transaction.</source> + <translation>Bu her işlemde ödeceğiniz en düşük işlem ücretidir.</translation> + </message> + <message> + <source>This is the transaction fee you will pay if you send a transaction.</source> + <translation>Eğer bir gönderme işlemi yaparsanız bu ödeyeceğiniz işlem ücretidir.</translation> </message> <message> <source>Threshold for disconnecting misbehaving peers (default: %u)</source> <translation>Aksaklık gösteren eşlerle bağlantıyı kesme sınırı (varsayılan: %u)</translation> </message> <message> + <source>Transaction amounts must not be negative</source> + <translation>İşlem tutarı negatif olmamalıdır</translation> + </message> + <message> + <source>Transaction has too long of a mempool chain</source> + <translation>İşlem çok uzun bir mempool zincirine sahip</translation> + </message> + <message> + <source>Transaction must have at least one recipient</source> + <translation>İşlemin en az bir alıcısı olması gerekir</translation> + </message> + <message> <source>Unknown network specified in -onlynet: '%s'</source> - <translation>-onlynet için bilinmeyen bir şebeke belirtildi: '%s'</translation> + <translation>-onlynet için bilinmeyen bir ağ belirtildi: '%s'</translation> </message> <message> <source>Insufficient funds</source> @@ -2679,7 +3883,7 @@ </message> <message> <source>Add a node to connect to and attempt to keep the connection open</source> - <translation>Bağlanılacak düğüm ekle ve bağlantıyı zinde tutmaya çalış</translation> + <translation>Bağlanılacak düğüm ekle ve bağlantıyı sürekli açık tutmaya çalış</translation> </message> <message> <source>Loading wallet...</source> @@ -2695,7 +3899,7 @@ </message> <message> <source>Rescanning...</source> - <translation>Yeniden tarama...</translation> + <translation>Yeniden taranıyor...</translation> </message> <message> <source>Done loading</source> diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts index e98bc080e2..20875c2327 100644 --- a/src/qt/locale/bitcoin_zh_CN.ts +++ b/src/qt/locale/bitcoin_zh_CN.ts @@ -482,6 +482,10 @@ <translation>%1 客戶</translation> </message> <message> + <source>Connecting to peers...</source> + <translation>正在连接到节点……</translation> + </message> + <message> <source>Catching up...</source> <translation>更新中...</translation> </message> @@ -1927,7 +1931,11 @@ <source>(no amount requested)</source> <translation>(无请求金额)</translation> </message> - </context> + <message> + <source>Requested</source> + <translation>总额</translation> + </message> +</context> <context> <name>SendCoinsDialog</name> <message> @@ -2179,6 +2187,10 @@ <translation>警告:未知的更改地址</translation> </message> <message> + <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source> + <translation>你选择的找零地址未被包含在本钱包中,你钱包中的部分或全部金额将被发送至该地址。你确定要这样做吗?</translation> + </message> + <message> <source>(no label)</source> <translation>(无标签)</translation> </message> @@ -2460,6 +2472,14 @@ <translation>0/未确认,%1</translation> </message> <message> + <source>in memory pool</source> + <translation>在内存池中</translation> + </message> + <message> + <source>not in memory pool</source> + <translation>不在内存池中</translation> + </message> + <message> <source>abandoned</source> <translation>已抛弃</translation> </message> @@ -3201,6 +3221,10 @@ <translation>使用UPnp映射监听端口 (默认: %u) </translation> </message> <message> + <source>Use the test chain</source> + <translation>使用测试链</translation> + </message> + <message> <source>User Agent comment (%s) contains unsafe characters.</source> <translation>用户代理评论(%s)包含不安全的字符。</translation> </message> diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 89f633aa73..7ff00b1e9e 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -277,6 +277,9 @@ void OptionsDialog::showRestartWarning(bool fPersistent) void OptionsDialog::clearStatusLabel() { ui->statusLabel->clear(); + if (model && model->isRestartRequired()) { + showRestartWarning(true); + } } void OptionsDialog::updateProxyValidationState() @@ -286,7 +289,7 @@ void OptionsDialog::updateProxyValidationState() if (pUiProxyIp->isValid() && (!ui->proxyPort->isEnabled() || ui->proxyPort->text().toInt() > 0) && (!ui->proxyPortTor->isEnabled() || ui->proxyPortTor->text().toInt() > 0)) { setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxys are valid - ui->statusLabel->clear(); + clearStatusLabel(); } else { diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h index ee1a37d83c..a2fea3fdc6 100644 --- a/src/qt/paymentrequestplus.h +++ b/src/qt/paymentrequestplus.h @@ -5,7 +5,10 @@ #ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H #define BITCOIN_QT_PAYMENTREQUESTPLUS_H +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" #include "paymentrequest.pb.h" +#pragma GCC diagnostic pop #include "base58.h" diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index 688e8123af..dd75f12076 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -55,8 +55,6 @@ const char* BIP70_MESSAGE_PAYMENTREQUEST = "PaymentRequest"; const char* BIP71_MIMETYPE_PAYMENT = "application/bitcoin-payment"; const char* BIP71_MIMETYPE_PAYMENTACK = "application/bitcoin-paymentack"; const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest"; -// BIP70 max payment request size in bytes (DoS protection) -const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000; struct X509StoreDeleter { void operator()(X509_STORE* b) { diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index 9d46280a37..7c6d4507fe 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -53,7 +53,7 @@ class QUrl; QT_END_NAMESPACE // BIP70 max payment request size in bytes (DoS protection) -extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE; +static const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000; class PaymentServer : public QObject { diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 368654bfa6..7b69c81ff9 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -820,7 +820,8 @@ UniValue pruneblockchain(const JSONRPCRequest& request) throw runtime_error( "pruneblockchain\n" "\nArguments:\n" - "1. \"height\" (numeric, required) The block height to prune up to. May be set to a discrete height, or to a unix timestamp to prune based on block time.\n" + "1. \"height\" (numeric, required) The block height to prune up to. May be set to a discrete height, or a unix timestamp\n" + " to prune blocks whose block time is at least 2 hours older than the provided timestamp.\n" "\nResult:\n" "n (numeric) Height of the last block pruned.\n" "\nExamples:\n" @@ -839,7 +840,8 @@ UniValue pruneblockchain(const JSONRPCRequest& request) // Height value more than a billion is too high to be a block height, and // too low to be a block time (corresponds to timestamp from Sep 2001). if (heightParam > 1000000000) { - CBlockIndex* pindex = chainActive.FindEarliestAtLeast(heightParam); + // Add a 2 hour buffer to include blocks which might have had old timestamps + CBlockIndex* pindex = chainActive.FindEarliestAtLeast(heightParam - 7200); if (!pindex) { throw JSONRPCError(RPC_INTERNAL_ERROR, "Could not find block with at least the specified timestamp."); } diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp index 480c45516c..6fd50127bd 100644 --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -167,6 +167,7 @@ UniValue validateaddress(const JSONRPCRequest& request) " \"pubkey\" : \"publickeyhex\", (string) The hex value of the raw public key\n" " \"iscompressed\" : true|false, (boolean) If the address is compressed\n" " \"account\" : \"account\" (string) DEPRECATED. The account associated with the address, \"\" is the default account\n" + " \"timestamp\" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT)\n" " \"hdkeypath\" : \"keypath\" (string, optional) The HD keypath if the key is HD and available\n" " \"hdmasterkeyid\" : \"<hash160>\" (string, optional) The Hash160 of the HD master pubkey\n" "}\n" @@ -204,10 +205,19 @@ UniValue validateaddress(const JSONRPCRequest& request) if (pwalletMain && pwalletMain->mapAddressBook.count(dest)) ret.push_back(Pair("account", pwalletMain->mapAddressBook[dest].name)); CKeyID keyID; - if (pwalletMain && address.GetKeyID(keyID) && pwalletMain->mapKeyMetadata.count(keyID) && !pwalletMain->mapKeyMetadata[keyID].hdKeypath.empty()) - { - ret.push_back(Pair("hdkeypath", pwalletMain->mapKeyMetadata[keyID].hdKeypath)); - ret.push_back(Pair("hdmasterkeyid", pwalletMain->mapKeyMetadata[keyID].hdMasterKeyID.GetHex())); + if (pwalletMain) { + const auto& meta = pwalletMain->mapKeyMetadata; + auto it = address.GetKeyID(keyID) ? meta.find(keyID) : meta.end(); + if (it == meta.end()) { + it = meta.find(CScriptID(scriptPubKey)); + } + if (it != meta.end()) { + ret.push_back(Pair("timestamp", it->second.nCreateTime)); + if (!it->second.hdKeypath.empty()) { + ret.push_back(Pair("hdkeypath", it->second.hdKeypath)); + ret.push_back(Pair("hdmasterkeyid", it->second.hdMasterKeyID.GetHex())); + } + } } #endif } diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 283d458c8d..0b763acd45 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -18,8 +18,6 @@ #include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> -#include <boost/iostreams/concepts.hpp> -#include <boost/iostreams/stream.hpp> #include <boost/shared_ptr.hpp> #include <boost/signals2/signal.hpp> #include <boost/thread.hpp> diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index 09bedc5460..6f364e42d1 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -93,8 +93,9 @@ static CSignatureCache signatureCache; // To be called once in AppInit2/TestingSetup to initialize the signatureCache void InitSignatureCache() { - size_t nMaxCacheSize = GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20); - if (nMaxCacheSize <= 0) return; + // nMaxCacheSize is unsigned. If -maxsigcachesize is set to zero, + // setup_bytes creates the minimum possible cache (2 elements). + size_t nMaxCacheSize = std::min(std::max((int64_t)0, GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE)), MAX_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20); size_t nElems = signatureCache.setup_bytes(nMaxCacheSize); LogPrintf("Using %zu MiB out of %zu requested for signature cache, able to store %zu elements\n", (nElems*sizeof(uint256)) >>20, nMaxCacheSize>>20, nElems); diff --git a/src/script/sigcache.h b/src/script/sigcache.h index c123a9ba0f..238952bb95 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -14,6 +14,8 @@ // systems). Due to how we count cache size, actual memory usage is slightly // more (~32.25 MB) static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 32; +// Maximum sig cache size allowed +static const int64_t MAX_MAX_SIG_CACHE_SIZE = 16384; class CPubKey; diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index a8f09ba6ae..c62e6ae838 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -23,7 +23,7 @@ #include <boost/foreach.hpp> #include <boost/test/unit_test.hpp> -// Tests this internal-to-main.cpp method: +// Tests these internal-to-net_processing.cpp methods: extern bool AddOrphanTx(const CTransactionRef& tx, NodeId peer); extern void EraseOrphansFor(NodeId peer); extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 236527a2ba..5842dd88d8 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -395,7 +395,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, { NotifyEntryAdded(entry.GetSharedTx()); // Add to memory pool without checking anything. - // Used by main.cpp AcceptToMemoryPool(), which DOES do + // Used by AcceptToMemoryPool(), which DOES do // all the appropriate checks. LOCK(cs); indexed_transaction_set::iterator newit = mapTx.insert(entry).first; diff --git a/src/validation.cpp b/src/validation.cpp index fe8f8365be..4ce0723b21 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3187,7 +3187,7 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation } if (fNewBlock) *fNewBlock = true; - if (!CheckBlock(block, state, chainparams.GetConsensus(), GetAdjustedTime()) || + if (!CheckBlock(block, state, chainparams.GetConsensus()) || !ContextualCheckBlock(block, state, chainparams.GetConsensus(), pindex->pprev)) { if (state.IsInvalid() && !state.CorruptionPossible()) { pindex->nStatus |= BLOCK_FAILED_VALID; @@ -3229,13 +3229,19 @@ static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidation bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<const CBlock> pblock, bool fForceProcessing, bool *fNewBlock) { { - LOCK(cs_main); - - // Store to disk CBlockIndex *pindex = NULL; if (fNewBlock) *fNewBlock = false; CValidationState state; - bool ret = AcceptBlock(pblock, state, chainparams, &pindex, fForceProcessing, NULL, fNewBlock); + // Ensure that CheckBlock() passes before calling AcceptBlock, as + // belt-and-suspenders. + bool ret = CheckBlock(*pblock, state, chainparams.GetConsensus()); + + LOCK(cs_main); + + if (ret) { + // Store to disk + ret = AcceptBlock(pblock, state, chainparams, &pindex, fForceProcessing, NULL, fNewBlock); + } CheckBlockIndex(chainparams.GetConsensus()); if (!ret) { GetMainSignals().BlockChecked(*pblock, state); diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 7d4ed70ed9..30f2414675 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -143,7 +143,7 @@ UniValue importprivkey(const JSONRPCRequest& request) throw JSONRPCError(RPC_WALLET_ERROR, "Error adding key to wallet"); // whenever a key is imported, we need to scan the whole chain - pwalletMain->nTimeFirstKey = 1; // 0 would be considered 'no value' + pwalletMain->UpdateTimeFirstKey(1); if (fRescan) { pwalletMain->ScanForWalletTransactions(chainActive.Genesis(), true); @@ -161,7 +161,7 @@ void ImportScript(const CScript& script, const string& strLabel, bool isRedeemSc pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(script) && !pwalletMain->AddWatchOnly(script)) + if (!pwalletMain->HaveWatchOnly(script) && !pwalletMain->AddWatchOnly(script, 0 /* nCreateTime */)) throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); if (isRedeemScript) { @@ -500,8 +500,7 @@ UniValue importwallet(const JSONRPCRequest& request) while (pindex && pindex->pprev && pindex->GetBlockTime() > nTimeBegin - 7200) pindex = pindex->pprev; - if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey) - pwalletMain->nTimeFirstKey = nTimeBegin; + pwalletMain->UpdateTimeFirstKey(nTimeBegin); LogPrintf("Rescanning last %i blocks\n", chainActive.Height() - pindex->nHeight + 1); pwalletMain->ScanForWalletTransactions(pindex); @@ -576,15 +575,17 @@ UniValue dumpwallet(const JSONRPCRequest& request) if (!file.is_open()) throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file"); - std::map<CKeyID, int64_t> mapKeyBirth; + std::map<CTxDestination, int64_t> mapKeyBirth; std::set<CKeyID> setKeyPool; pwalletMain->GetKeyBirthTimes(mapKeyBirth); pwalletMain->GetAllReserveKeys(setKeyPool); // sort time/key pairs std::vector<std::pair<int64_t, CKeyID> > vKeyBirth; - for (std::map<CKeyID, int64_t>::const_iterator it = mapKeyBirth.begin(); it != mapKeyBirth.end(); it++) { - vKeyBirth.push_back(std::make_pair(it->second, it->first)); + for (const auto& entry : mapKeyBirth) { + if (const CKeyID* keyID = boost::get<CKeyID>(&entry.first)) { // set and test + vKeyBirth.push_back(std::make_pair(entry.second, *keyID)); + } } mapKeyBirth.clear(); std::sort(vKeyBirth.begin(), vKeyBirth.end()); @@ -640,7 +641,8 @@ UniValue dumpwallet(const JSONRPCRequest& request) } -UniValue processImport(const UniValue& data) { +UniValue ProcessImport(const UniValue& data, const int64_t timestamp) +{ try { bool success = false; @@ -659,7 +661,6 @@ UniValue processImport(const UniValue& data) { const bool& internal = data.exists("internal") ? data["internal"].get_bool() : false; const bool& watchOnly = data.exists("watchonly") ? data["watchonly"].get_bool() : false; const string& label = data.exists("label") && !internal ? data["label"].get_str() : ""; - const int64_t& timestamp = data.exists("timestamp") && data["timestamp"].get_int64() > 1 ? data["timestamp"].get_int64() : 1; bool isScript = scriptPubKey.getType() == UniValue::VSTR; bool isP2SH = strRedeemScript.length() > 0; @@ -671,6 +672,9 @@ UniValue processImport(const UniValue& data) { if (!isScript) { address = CBitcoinAddress(output); + if (!address.IsValid()) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address"); + } script = GetScriptForDestination(address.Get()); } else { if (!IsHex(output)) { @@ -721,7 +725,7 @@ UniValue processImport(const UniValue& data) { pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(redeemScript) && !pwalletMain->AddWatchOnly(redeemScript)) { + if (!pwalletMain->HaveWatchOnly(redeemScript) && !pwalletMain->AddWatchOnly(redeemScript, timestamp)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } @@ -738,7 +742,7 @@ UniValue processImport(const UniValue& data) { pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(redeemDestination) && !pwalletMain->AddWatchOnly(redeemDestination)) { + if (!pwalletMain->HaveWatchOnly(redeemDestination) && !pwalletMain->AddWatchOnly(redeemDestination, timestamp)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } @@ -782,9 +786,7 @@ UniValue processImport(const UniValue& data) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding key to wallet"); } - if (timestamp < pwalletMain->nTimeFirstKey) { - pwalletMain->nTimeFirstKey = timestamp; - } + pwalletMain->UpdateTimeFirstKey(timestamp); } } @@ -833,7 +835,7 @@ UniValue processImport(const UniValue& data) { pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(pubKeyScript) && !pwalletMain->AddWatchOnly(pubKeyScript)) { + if (!pwalletMain->HaveWatchOnly(pubKeyScript) && !pwalletMain->AddWatchOnly(pubKeyScript, timestamp)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } @@ -851,7 +853,7 @@ UniValue processImport(const UniValue& data) { pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(scriptRawPubKey) && !pwalletMain->AddWatchOnly(scriptRawPubKey)) { + if (!pwalletMain->HaveWatchOnly(scriptRawPubKey) && !pwalletMain->AddWatchOnly(scriptRawPubKey, timestamp)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } @@ -912,9 +914,7 @@ UniValue processImport(const UniValue& data) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding key to wallet"); } - if (timestamp < pwalletMain->nTimeFirstKey) { - pwalletMain->nTimeFirstKey = timestamp; - } + pwalletMain->UpdateTimeFirstKey(timestamp); success = true; } @@ -927,7 +927,7 @@ UniValue processImport(const UniValue& data) { pwalletMain->MarkDirty(); - if (!pwalletMain->HaveWatchOnly(script) && !pwalletMain->AddWatchOnly(script)) { + if (!pwalletMain->HaveWatchOnly(script) && !pwalletMain->AddWatchOnly(script, timestamp)) { throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet"); } @@ -958,6 +958,20 @@ UniValue processImport(const UniValue& data) { } } +int64_t GetImportTimestamp(const UniValue& data, int64_t now) +{ + if (data.exists("timestamp")) { + const UniValue& timestamp = data["timestamp"]; + if (timestamp.isNum()) { + return timestamp.get_int64(); + } else if (timestamp.isStr() && timestamp.get_str() == "now") { + return now; + } + throw JSONRPCError(RPC_TYPE_ERROR, strprintf("Expected number or \"now\" timestamp value for key. got type %s", uvTypeName(timestamp.type()))); + } + throw JSONRPCError(RPC_TYPE_ERROR, "Missing required timestamp field for key"); +} + UniValue importmulti(const JSONRPCRequest& mainRequest) { // clang-format off @@ -970,13 +984,18 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) " [ (array of json objects)\n" " {\n" " \"scriptPubKey\": \"<script>\" | { \"address\":\"<address>\" }, (string / json, required) Type of scriptPubKey (string for script, json for address)\n" + " \"timestamp\": timestamp | \"now\" , (integer / string, required) Creation time of the key in seconds since epoch (Jan 1 1970 GMT),\n" + " or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n" + " key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n" + " \"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n" + " 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n" + " creation time of all keys being imported by the importmulti call will be scanned.\n" " \"redeemscript\": \"<script>\" , (string, optional) Allowed only if the scriptPubKey is a P2SH address or a P2SH scriptPubKey\n" " \"pubkeys\": [\"<pubKey>\", ... ] , (array, optional) Array of strings giving pubkeys that must occur in the output or redeemscript\n" " \"keys\": [\"<key>\", ... ] , (array, optional) Array of strings giving private keys whose corresponding public keys must occur in the output or redeemscript\n" " \"internal\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be be treated as not incoming payments\n" " \"watchonly\": <true> , (boolean, optional, default: false) Stating whether matching outputs should be considered watched even when they're not spendable, only allowed if keys are empty\n" " \"label\": <label> , (string, optional, default: '') Label to assign to the address (aka account name, for now), only allowed with internal=false\n" - " \"timestamp\": 1454686740, (integer, optional, default now) Timestamp\n" " }\n" " ,...\n" " ]\n" @@ -1015,6 +1034,12 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) LOCK2(cs_main, pwalletMain->cs_wallet); EnsureWalletIsUnlocked(); + // Verify all timestamps are present before importing any keys. + const int64_t now = chainActive.Tip() ? chainActive.Tip()->GetMedianTimePast() : 0; + for (const UniValue& data : requests.getValues()) { + GetImportTimestamp(data, now); + } + bool fRunScan = false; const int64_t minimumTimestamp = 1; int64_t nLowestTimestamp = 0; @@ -1028,7 +1053,8 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) UniValue response(UniValue::VARR); BOOST_FOREACH (const UniValue& data, requests.getValues()) { - const UniValue result = processImport(data); + const int64_t timestamp = std::max(GetImportTimestamp(data, now), minimumTimestamp); + const UniValue result = ProcessImport(data, timestamp); response.push_back(result); if (!fRescan) { @@ -1041,15 +1067,13 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) } // Get the lowest timestamp. - const int64_t& timestamp = data.exists("timestamp") && data["timestamp"].get_int64() > minimumTimestamp ? data["timestamp"].get_int64() : minimumTimestamp; - if (timestamp < nLowestTimestamp) { nLowestTimestamp = timestamp; } } if (fRescan && fRunScan && requests.size() && nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()) { - CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(nLowestTimestamp) : chainActive.Genesis(); + CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(std::max<int64_t>(nLowestTimestamp - 7200, 0)) : chainActive.Genesis(); if (pindex) { pwalletMain->ScanForWalletTransactions(pindex, true); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index a5e8752fc0..f8f5a9306d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -113,8 +113,7 @@ CPubKey CWallet::GenerateNewKey() assert(secret.VerifyPubKey(pubkey)); mapKeyMetadata[pubkey.GetID()] = metadata; - if (!nTimeFirstKey || nCreationTime < nTimeFirstKey) - nTimeFirstKey = nCreationTime; + UpdateTimeFirstKey(nCreationTime); if (!AddKeyPubKey(secret, pubkey)) throw std::runtime_error(std::string(__func__) + ": AddKey failed"); @@ -207,13 +206,11 @@ bool CWallet::AddCryptedKey(const CPubKey &vchPubKey, return false; } -bool CWallet::LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &meta) +bool CWallet::LoadKeyMetadata(const CTxDestination& keyID, const CKeyMetadata &meta) { AssertLockHeld(cs_wallet); // mapKeyMetadata - if (meta.nCreateTime && (!nTimeFirstKey || meta.nCreateTime < nTimeFirstKey)) - nTimeFirstKey = meta.nCreateTime; - - mapKeyMetadata[pubkey.GetID()] = meta; + UpdateTimeFirstKey(meta.nCreateTime); + mapKeyMetadata[keyID] = meta; return true; } @@ -222,6 +219,18 @@ bool CWallet::LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigne return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); } +void CWallet::UpdateTimeFirstKey(int64_t nCreateTime) +{ + AssertLockHeld(cs_wallet); + if (nCreateTime <= 1) { + // Cannot determine birthday information, so set the wallet birthday to + // the beginning of time. + nTimeFirstKey = 1; + } else if (!nTimeFirstKey || nCreateTime < nTimeFirstKey) { + nTimeFirstKey = nCreateTime; + } +} + bool CWallet::AddCScript(const CScript& redeemScript) { if (!CCryptoKeyStore::AddCScript(redeemScript)) @@ -247,15 +256,22 @@ bool CWallet::LoadCScript(const CScript& redeemScript) return CCryptoKeyStore::AddCScript(redeemScript); } -bool CWallet::AddWatchOnly(const CScript &dest) +bool CWallet::AddWatchOnly(const CScript& dest) { if (!CCryptoKeyStore::AddWatchOnly(dest)) return false; - nTimeFirstKey = 1; // No birthday information for watch-only keys. + const CKeyMetadata& meta = mapKeyMetadata[CScriptID(dest)]; + UpdateTimeFirstKey(meta.nCreateTime); NotifyWatchonlyChanged(true); if (!fFileBacked) return true; - return CWalletDB(strWalletFile).WriteWatchOnly(dest); + return CWalletDB(strWalletFile).WriteWatchOnly(dest, meta); +} + +bool CWallet::AddWatchOnly(const CScript& dest, int64_t nCreateTime) +{ + mapKeyMetadata[CScriptID(dest)].nCreateTime = nCreateTime; + return AddWatchOnly(dest); } bool CWallet::RemoveWatchOnly(const CScript &dest) @@ -3416,14 +3432,16 @@ public: void operator()(const CNoDestination &none) {} }; -void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const { +void CWallet::GetKeyBirthTimes(std::map<CTxDestination, int64_t> &mapKeyBirth) const { AssertLockHeld(cs_wallet); // mapKeyMetadata mapKeyBirth.clear(); // get birth times for keys with metadata - for (std::map<CKeyID, CKeyMetadata>::const_iterator it = mapKeyMetadata.begin(); it != mapKeyMetadata.end(); it++) - if (it->second.nCreateTime) - mapKeyBirth[it->first] = it->second.nCreateTime; + for (const auto& entry : mapKeyMetadata) { + if (entry.second.nCreateTime) { + mapKeyBirth[entry.first] = entry.second.nCreateTime; + } + } // map in which we'll infer heights of other keys CBlockIndex *pindexMax = chainActive[std::max(0, chainActive.Height() - 144)]; // the tip can be reorganized; use a 144-block safety margin diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index ea4787c363..a7b15a8441 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -611,6 +611,20 @@ private: bool fFileBacked; std::set<int64_t> setKeyPool; + + int64_t nTimeFirstKey; + + /** + * Private version of AddWatchOnly method which does not accept a + * timestamp, and which will reset the wallet's nTimeFirstKey value to 1 if + * the watch key did not previously have a timestamp associated with it. + * Because this is an inherited virtual method, it is accessible despite + * being marked private, but it is marked private anyway to encourage use + * of the other AddWatchOnly which accepts a timestamp and sets + * nTimeFirstKey more intelligently for more efficient rescans. + */ + bool AddWatchOnly(const CScript& dest) override; + public: /* * Main wallet lock. @@ -635,7 +649,9 @@ public: mapKeyMetadata[keyid] = CKeyMetadata(keypool.nTime); } - std::map<CKeyID, CKeyMetadata> mapKeyMetadata; + // Map from Key ID (for regular keys) or Script ID (for watch-only keys) to + // key metadata. + std::map<CTxDestination, CKeyMetadata> mapKeyMetadata; typedef std::map<unsigned int, CMasterKey> MasterKeyMap; MasterKeyMap mapMasterKeys; @@ -688,8 +704,6 @@ public: std::set<COutPoint> setLockedCoins; - int64_t nTimeFirstKey; - const CWalletTx* GetWalletTx(const uint256& hash) const; //! check whether we are allowed to upgrade (or already support) to the named feature @@ -723,19 +737,20 @@ public: CPubKey GenerateNewKey(); void DeriveNewChildKey(CKeyMetadata& metadata, CKey& secret); //! Adds a key to the store, and saves it to disk. - bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); + bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override; //! Adds a key to the store, without saving it to disk (used by LoadWallet) bool LoadKey(const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); } //! Load metadata (used by LoadWallet) - bool LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &metadata); + bool LoadKeyMetadata(const CTxDestination& pubKey, const CKeyMetadata &metadata); bool LoadMinVersion(int nVersion) { AssertLockHeld(cs_wallet); nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; } + void UpdateTimeFirstKey(int64_t nCreateTime); //! Adds an encrypted key to the store, and saves it to disk. - bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); + bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret) override; //! Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); - bool AddCScript(const CScript& redeemScript); + bool AddCScript(const CScript& redeemScript) override; bool LoadCScript(const CScript& redeemScript); //! Adds a destination data tuple to the store, and saves it to disk @@ -748,8 +763,8 @@ public: bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const; //! Adds a watch-only address to the store, and saves it to disk. - bool AddWatchOnly(const CScript &dest); - bool RemoveWatchOnly(const CScript &dest); + bool AddWatchOnly(const CScript& dest, int64_t nCreateTime); + bool RemoveWatchOnly(const CScript &dest) override; //! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet) bool LoadWatchOnly(const CScript &dest); @@ -757,7 +772,7 @@ public: bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase); bool EncryptWallet(const SecureString& strWalletPassphrase); - void GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const; + void GetKeyBirthTimes(std::map<CTxDestination, int64_t> &mapKeyBirth) const; /** * Increment the next transaction order id @@ -771,11 +786,11 @@ public: void MarkDirty(); bool AddToWallet(const CWalletTx& wtxIn, bool fFlushOnClose=true); bool LoadToWallet(const CWalletTx& wtxIn); - void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock); + void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, int posInBlock) override; bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlockIndex* pIndex, int posInBlock, bool fUpdate); int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false); void ReacceptWalletTransactions(); - void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman); + void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) override; std::vector<uint256> ResendWalletTransactionsBefore(int64_t nTime, CConnman* connman); CAmount GetBalance() const; CAmount GetUnconfirmedBalance() const; @@ -857,7 +872,7 @@ public: bool IsAllFromMe(const CTransaction& tx, const isminefilter& filter) const; CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const; CAmount GetChange(const CTransaction& tx) const; - void SetBestChain(const CBlockLocator& loc); + void SetBestChain(const CBlockLocator& loc) override; DBErrors LoadWallet(bool& fFirstRunRet); DBErrors ZapWalletTx(std::vector<CWalletTx>& vWtx); @@ -867,9 +882,9 @@ public: bool DelAddressBook(const CTxDestination& address); - void UpdatedTransaction(const uint256 &hashTx); + void UpdatedTransaction(const uint256 &hashTx) override; - void Inventory(const uint256 &hash) + void Inventory(const uint256 &hash) override { { LOCK(cs_wallet); @@ -879,8 +894,8 @@ public: } } - void GetScriptForMining(boost::shared_ptr<CReserveScript> &script); - void ResetRequestCount(const uint256 &hash) + void GetScriptForMining(boost::shared_ptr<CReserveScript> &script) override; + void ResetRequestCount(const uint256 &hash) override { LOCK(cs_wallet); mapRequestCount[hash] = 0; diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index b00ce36b70..81fdde401e 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -120,15 +120,19 @@ bool CWalletDB::WriteCScript(const uint160& hash, const CScript& redeemScript) return Write(std::make_pair(std::string("cscript"), hash), *(const CScriptBase*)(&redeemScript), false); } -bool CWalletDB::WriteWatchOnly(const CScript &dest) +bool CWalletDB::WriteWatchOnly(const CScript &dest, const CKeyMetadata& keyMeta) { nWalletDBUpdateCounter++; + if (!Write(std::make_pair(std::string("watchmeta"), *(const CScriptBase*)(&dest)), keyMeta)) + return false; return Write(std::make_pair(std::string("watchs"), *(const CScriptBase*)(&dest)), '1'); } bool CWalletDB::EraseWatchOnly(const CScript &dest) { nWalletDBUpdateCounter++; + if (!Erase(std::make_pair(std::string("watchmeta"), *(const CScriptBase*)(&dest)))) + return false; return Erase(std::make_pair(std::string("watchs"), *(const CScriptBase*)(&dest))); } @@ -259,6 +263,7 @@ class CWalletScanState { public: unsigned int nKeys; unsigned int nCKeys; + unsigned int nWatchKeys; unsigned int nKeyMeta; bool fIsEncrypted; bool fAnyUnordered; @@ -266,7 +271,7 @@ public: vector<uint256> vWalletUpgrade; CWalletScanState() { - nKeys = nCKeys = nKeyMeta = 0; + nKeys = nCKeys = nWatchKeys = nKeyMeta = 0; fIsEncrypted = false; fAnyUnordered = false; nFileVersion = 0; @@ -348,16 +353,13 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, } else if (strType == "watchs") { + wss.nWatchKeys++; CScript script; ssKey >> *(CScriptBase*)(&script); char fYes; ssValue >> fYes; if (fYes == '1') pwallet->LoadWatchOnly(script); - - // Watch-only addresses have no birthday information for now, - // so set the wallet birthday to the beginning of time. - pwallet->nTimeFirstKey = 1; } else if (strType == "key" || strType == "wkey") { @@ -458,20 +460,27 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, } wss.fIsEncrypted = true; } - else if (strType == "keymeta") + else if (strType == "keymeta" || strType == "watchmeta") { - CPubKey vchPubKey; - ssKey >> vchPubKey; + CTxDestination keyID; + if (strType == "keymeta") + { + CPubKey vchPubKey; + ssKey >> vchPubKey; + keyID = vchPubKey.GetID(); + } + else if (strType == "watchmeta") + { + CScript script; + ssKey >> *(CScriptBase*)(&script); + keyID = CScriptID(script); + } + CKeyMetadata keyMeta; ssValue >> keyMeta; wss.nKeyMeta++; - pwallet->LoadKeyMetadata(vchPubKey, keyMeta); - - // find earliest key creation time, as wallet birthday - if (!pwallet->nTimeFirstKey || - (keyMeta.nCreateTime < pwallet->nTimeFirstKey)) - pwallet->nTimeFirstKey = keyMeta.nCreateTime; + pwallet->LoadKeyMetadata(keyID, keyMeta); } else if (strType == "defaultkey") { @@ -550,8 +559,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; + LOCK(pwallet->cs_wallet); try { - LOCK(pwallet->cs_wallet); int nMinVersion = 0; if (Read((string)"minversion", nMinVersion)) { @@ -625,8 +634,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) wss.nKeys, wss.nCKeys, wss.nKeyMeta, wss.nKeys + wss.nCKeys); // nTimeFirstKey is only reliable if all keys have metadata - if ((wss.nKeys + wss.nCKeys) != wss.nKeyMeta) - pwallet->nTimeFirstKey = 1; // 0 would be considered 'no value' + if ((wss.nKeys + wss.nCKeys + wss.nWatchKeys) != wss.nKeyMeta) + pwallet->UpdateTimeFirstKey(1); BOOST_FOREACH(uint256 hash, wss.vWalletUpgrade) WriteTx(pwallet->mapWallet[hash]); diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h index 8437a95ba7..c7c65465df 100644 --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -135,7 +135,7 @@ public: bool WriteCScript(const uint160& hash, const CScript& redeemScript); - bool WriteWatchOnly(const CScript &script); + bool WriteWatchOnly(const CScript &script, const CKeyMetadata &keymeta); bool EraseWatchOnly(const CScript &script); bool WriteBestBlock(const CBlockLocator& locator); |