aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/amount.h10
-rw-r--r--src/bitcoin-cli-res.rc4
-rw-r--r--src/bitcoin-tx-res.rc35
-rw-r--r--src/bitcoind-res.rc4
-rw-r--r--src/chainparams.h1
-rw-r--r--src/consensus/validation.h80
-rw-r--r--src/init.cpp31
-rw-r--r--src/main.cpp187
-rw-r--r--src/main.h81
-rw-r--r--src/miner.cpp4
-rw-r--r--src/net.cpp4
-rw-r--r--src/netbase.cpp26
-rw-r--r--src/netbase.h2
-rw-r--r--src/qt/bitcoingui.cpp1
-rw-r--r--src/qt/locale/bitcoin_ar.ts6
-rw-r--r--src/qt/locale/bitcoin_be_BY.ts140
-rw-r--r--src/qt/locale/bitcoin_bg.ts6
-rw-r--r--src/qt/locale/bitcoin_ca.ts4
-rw-r--r--src/qt/locale/bitcoin_ca@valencia.ts4
-rw-r--r--src/qt/locale/bitcoin_ca_ES.ts4
-rw-r--r--src/qt/locale/bitcoin_cs.ts4
-rw-r--r--src/qt/locale/bitcoin_da.ts12
-rw-r--r--src/qt/locale/bitcoin_de.ts40
-rw-r--r--src/qt/locale/bitcoin_el_GR.ts228
-rw-r--r--src/qt/locale/bitcoin_eo.ts6
-rw-r--r--src/qt/locale/bitcoin_es.ts4
-rw-r--r--src/qt/locale/bitcoin_es_CL.ts6
-rw-r--r--src/qt/locale/bitcoin_es_DO.ts6
-rw-r--r--src/qt/locale/bitcoin_et.ts6
-rw-r--r--src/qt/locale/bitcoin_fa.ts6
-rw-r--r--src/qt/locale/bitcoin_fa_IR.ts6
-rw-r--r--src/qt/locale/bitcoin_fi.ts4
-rw-r--r--src/qt/locale/bitcoin_fr.ts8
-rw-r--r--src/qt/locale/bitcoin_gl.ts6
-rw-r--r--src/qt/locale/bitcoin_he.ts4
-rw-r--r--src/qt/locale/bitcoin_hu.ts6
-rw-r--r--src/qt/locale/bitcoin_id_ID.ts6
-rw-r--r--src/qt/locale/bitcoin_it.ts4
-rw-r--r--src/qt/locale/bitcoin_ja.ts8
-rw-r--r--src/qt/locale/bitcoin_ka.ts6
-rw-r--r--src/qt/locale/bitcoin_ko_KR.ts6
-rw-r--r--src/qt/locale/bitcoin_ky.ts6
-rw-r--r--src/qt/locale/bitcoin_la.ts6
-rw-r--r--src/qt/locale/bitcoin_lt.ts6
-rw-r--r--src/qt/locale/bitcoin_lv_LV.ts6
-rw-r--r--src/qt/locale/bitcoin_nb.ts8
-rw-r--r--src/qt/locale/bitcoin_nl.ts4
-rw-r--r--src/qt/locale/bitcoin_pam.ts6
-rw-r--r--src/qt/locale/bitcoin_pl.ts4
-rw-r--r--src/qt/locale/bitcoin_pt_BR.ts34
-rw-r--r--src/qt/locale/bitcoin_pt_PT.ts4
-rw-r--r--src/qt/locale/bitcoin_ro_RO.ts106
-rw-r--r--src/qt/locale/bitcoin_ru.ts4
-rw-r--r--src/qt/locale/bitcoin_sk.ts6
-rw-r--r--src/qt/locale/bitcoin_sl_SI.ts6
-rw-r--r--src/qt/locale/bitcoin_sv.ts8
-rw-r--r--src/qt/locale/bitcoin_tr.ts12
-rw-r--r--src/qt/locale/bitcoin_uk.ts8
-rw-r--r--src/qt/locale/bitcoin_zh_CN.ts20
-rw-r--r--src/qt/locale/bitcoin_zh_TW.ts4
-rw-r--r--src/qt/overviewpage.cpp6
-rw-r--r--src/qt/res/bitcoin-qt-res.rc2
-rw-r--r--src/qt/scicon.cpp6
-rw-r--r--src/rest.cpp94
-rw-r--r--src/rpcblockchain.cpp2
-rw-r--r--src/rpcmining.cpp1
-rw-r--r--src/rpcrawtransaction.cpp3
-rw-r--r--src/scheduler.cpp2
-rw-r--r--src/test/alert_tests.cpp65
-rw-r--r--src/test/checkblock_tests.cpp9
-rw-r--r--src/test/main_tests.cpp39
-rw-r--r--src/test/miner_tests.cpp1
-rw-r--r--src/test/netbase_tests.cpp5
-rw-r--r--src/test/sighash_tests.cpp7
-rw-r--r--src/test/transaction_tests.cpp3
-rw-r--r--src/txmempool.cpp1
-rw-r--r--src/wallet/wallet.cpp1
-rw-r--r--src/wallet/walletdb.cpp1
79 files changed, 1087 insertions, 440 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index c0aba3eae6..1c2f770418 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,6 +92,7 @@ BITCOIN_CORE_H = \
compressor.h \
consensus/consensus.h \
consensus/params.h \
+ consensus/validation.h \
core_io.h \
eccryptoverify.h \
ecwrapper.h \
@@ -352,6 +353,10 @@ bitcoin_tx_SOURCES = bitcoin-tx.cpp
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+if TARGET_WINDOWS
+bitcoin_tx_SOURCES += bitcoin-tx-res.rc
+endif
+
bitcoin_tx_LDADD = \
$(LIBBITCOIN_UNIVALUE) \
$(LIBBITCOIN_COMMON) \
diff --git a/src/amount.h b/src/amount.h
index 9212244a88..7dc62edac4 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -16,7 +16,15 @@ typedef int64_t CAmount;
static const CAmount COIN = 100000000;
static const CAmount CENT = 1000000;
-/** No amount larger than this (in satoshi) is valid */
+/** No amount larger than this (in satoshi) is valid.
+ *
+ * Note that this constant is *not* the total money supply, which in Bitcoin
+ * currently happens to be less than 21,000,000 BTC for various reasons, but
+ * rather a sanity check. As this sanity check is used by consensus-critical
+ * validation code, the exact value of the MAX_MONEY constant is consensus
+ * critical; in unusual circumstances like a(nother) overflow bug that allowed
+ * for the creation of coins out of thin air modification could lead to a fork.
+ * */
static const CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
diff --git a/src/bitcoin-cli-res.rc b/src/bitcoin-cli-res.rc
index 4ea1f38e47..1e4aa609bb 100644
--- a/src/bitcoin-cli-res.rc
+++ b/src/bitcoin-cli-res.rc
@@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoin-cli (OSS RPC client for Bitcoin)"
+ VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for Bitcoin Core)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-cli"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoin-cli.exe"
- VALUE "ProductName", "Bitcoin-cli"
+ VALUE "ProductName", "bitcoin-cli"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/bitcoin-tx-res.rc b/src/bitcoin-tx-res.rc
new file mode 100644
index 0000000000..3e49b820bc
--- /dev/null
+++ b/src/bitcoin-tx-res.rc
@@ -0,0 +1,35 @@
+#include <windows.h> // needed for VERSIONINFO
+#include "clientversion.h" // holds the needed client version information
+
+#define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD
+#define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD)
+#define VER_FILEVERSION VER_PRODUCTVERSION
+#define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4" // U.S. English - multilingual (hex)
+ BEGIN
+ VALUE "CompanyName", "Bitcoin"
+ VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
+ VALUE "FileVersion", VER_FILEVERSION_STR
+ VALUE "InternalName", "bitcoin-tx"
+ VALUE "LegalCopyright", COPYRIGHT_STR
+ VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
+ VALUE "OriginalFilename", "bitcoin-tx.exe"
+ VALUE "ProductName", "bitcoin-tx"
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
+ END
+END
diff --git a/src/bitcoind-res.rc b/src/bitcoind-res.rc
index d183179b17..3a64acd5d1 100644
--- a/src/bitcoind-res.rc
+++ b/src/bitcoind-res.rc
@@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoind (OSS daemon/client for Bitcoin)"
+ VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoind"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoind.exe"
- VALUE "ProductName", "Bitcoind"
+ VALUE "ProductName", "bitcoind"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/chainparams.h b/src/chainparams.h
index 6274bf3eb4..8044b553e1 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -49,7 +49,6 @@ public:
const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; }
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
int GetDefaultPort() const { return nDefaultPort; }
- int SubsidyHalvingInterval() const { return consensus.nSubsidyHalvingInterval; }
/** Used if GenerateBitcoins is called with a negative number of threads */
int DefaultMinerThreads() const { return nMinerThreads; }
diff --git a/src/consensus/validation.h b/src/consensus/validation.h
new file mode 100644
index 0000000000..c92bec4fae
--- /dev/null
+++ b/src/consensus/validation.h
@@ -0,0 +1,80 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_CONSENSUS_VALIDATION_H
+#define BITCOIN_CONSENSUS_VALIDATION_H
+
+#include <string>
+
+/** "reject" message codes */
+static const unsigned char REJECT_MALFORMED = 0x01;
+static const unsigned char REJECT_INVALID = 0x10;
+static const unsigned char REJECT_OBSOLETE = 0x11;
+static const unsigned char REJECT_DUPLICATE = 0x12;
+static const unsigned char REJECT_NONSTANDARD = 0x40;
+static const unsigned char REJECT_DUST = 0x41;
+static const unsigned char REJECT_INSUFFICIENTFEE = 0x42;
+static const unsigned char REJECT_CHECKPOINT = 0x43;
+
+/** Capture information about block/transaction validation */
+class CValidationState {
+private:
+ enum mode_state {
+ MODE_VALID, //! everything ok
+ MODE_INVALID, //! network rule violation (DoS value may be set)
+ MODE_ERROR, //! run-time error
+ } mode;
+ int nDoS;
+ std::string strRejectReason;
+ unsigned char chRejectCode;
+ bool corruptionPossible;
+public:
+ CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {}
+ bool DoS(int level, bool ret = false,
+ unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
+ bool corruptionIn=false) {
+ chRejectCode = chRejectCodeIn;
+ strRejectReason = strRejectReasonIn;
+ corruptionPossible = corruptionIn;
+ if (mode == MODE_ERROR)
+ return ret;
+ nDoS += level;
+ mode = MODE_INVALID;
+ return ret;
+ }
+ bool Invalid(bool ret = false,
+ unsigned char _chRejectCode=0, std::string _strRejectReason="") {
+ return DoS(0, ret, _chRejectCode, _strRejectReason);
+ }
+ bool Error(std::string strRejectReasonIn="") {
+ if (mode == MODE_VALID)
+ strRejectReason = strRejectReasonIn;
+ mode = MODE_ERROR;
+ return false;
+ }
+ bool IsValid() const {
+ return mode == MODE_VALID;
+ }
+ bool IsInvalid() const {
+ return mode == MODE_INVALID;
+ }
+ bool IsError() const {
+ return mode == MODE_ERROR;
+ }
+ bool IsInvalid(int &nDoSOut) const {
+ if (IsInvalid()) {
+ nDoSOut = nDoS;
+ return true;
+ }
+ return false;
+ }
+ bool CorruptionPossible() const {
+ return corruptionPossible;
+ }
+ unsigned char GetRejectCode() const { return chRejectCode; }
+ std::string GetRejectReason() const { return strRejectReason; }
+};
+
+#endif // BITCOIN_CONSENSUS_VALIDATION_H
diff --git a/src/init.cpp b/src/init.cpp
index 7e9230a228..2e4740602f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -13,6 +13,7 @@
#include "amount.h"
#include "checkpoints.h"
#include "compat/sanity.h"
+#include "consensus/validation.h"
#include "key.h"
#include "main.h"
#include "miner.h"
@@ -39,7 +40,9 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
+#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
+#include <boost/function.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
@@ -188,7 +191,11 @@ void Shutdown()
pwalletMain->Flush(true);
#endif
#ifndef WIN32
- boost::filesystem::remove(GetPidFile());
+ try {
+ boost::filesystem::remove(GetPidFile());
+ } catch (const boost::filesystem::filesystem_error& e) {
+ LogPrintf("%s: Unable to remove pidfile: %s\n", __func__, e.what());
+ }
#endif
UnregisterAllValidationInterfaces();
#ifdef ENABLE_WALLET
@@ -661,6 +668,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// to protect privacy, do not listen by default if a default proxy server is specified
if (SoftSetBoolArg("-listen", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
+ // to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1
+ // to listen locally, so don't rely on this happening through -listen below.
+ if (SoftSetBoolArg("-upnp", false))
+ LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__);
// to protect privacy, do not discover addresses by default
if (SoftSetBoolArg("-discover", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__);
@@ -863,9 +874,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
boost::filesystem::path pathLockFile = GetDataDir() / ".lock";
FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist.
if (file) fclose(file);
- static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
- if (!lock.try_lock())
- return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running."), strDataDir));
+
+ try {
+ static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
+ if (!lock.try_lock())
+ return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running."), strDataDir));
+ } catch(const boost::interprocess::interprocess_exception& e) {
+ return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.") + " %s.", strDataDir, e.what()));
+ }
+
#ifndef WIN32
CreatePidFile(GetPidFile(), getpid());
#endif
@@ -1382,6 +1399,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
StartNode(threadGroup, scheduler);
+ // Monitor the chain, and alert if we get blocks much quicker or slower than expected
+ int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing;
+ CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
+ boost::ref(cs_main), boost::cref(chainActive), nPowTargetSpacing);
+ scheduler.scheduleEvery(f, nPowTargetSpacing);
+
#ifdef ENABLE_WALLET
// Generate coins in the background
if (pwalletMain)
diff --git a/src/main.cpp b/src/main.cpp
index 7d7c97f773..039092cd19 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,6 +11,7 @@
#include "chainparams.h"
#include "checkpoints.h"
#include "checkqueue.h"
+#include "consensus/validation.h"
#include "init.h"
#include "merkleblock.h"
#include "net.h"
@@ -28,6 +29,7 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
+#include <boost/math/distributions/poisson.hpp>
#include <boost/thread.hpp>
using namespace std;
@@ -153,8 +155,8 @@ namespace {
uint256 hash;
CBlockIndex *pindex; //! Optional.
int64_t nTime; //! Time of "getdata" request in microseconds.
- int nValidatedQueuedBefore; //! Number of blocks queued with validated headers (globally) at the time this one is requested.
bool fValidatedHeaders; //! Whether this block has validated headers at the time of request.
+ int64_t nTimeDisconnect; //! The timeout for this block request (for disconnecting a slow peer)
};
map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
@@ -215,6 +217,7 @@ struct CNodeState {
int64_t nStallingSince;
list<QueuedBlock> vBlocksInFlight;
int nBlocksInFlight;
+ int nBlocksInFlightValidHeaders;
//! Whether we consider this a preferred download peer.
bool fPreferredDownload;
@@ -228,6 +231,7 @@ struct CNodeState {
fSyncStarted = false;
nStallingSince = 0;
nBlocksInFlight = 0;
+ nBlocksInFlightValidHeaders = 0;
fPreferredDownload = false;
}
};
@@ -259,6 +263,12 @@ void UpdatePreferredDownload(CNode* node, CNodeState* state)
nPreferredDownload += state->fPreferredDownload;
}
+// Returns time at which to timeout block request (nTime in microseconds)
+int64_t GetBlockTimeout(int64_t nTime, int nValidatedQueuedBefore, const Consensus::Params &consensusParams)
+{
+ return nTime + 500000 * consensusParams.nPowTargetSpacing * (4 + nValidatedQueuedBefore);
+}
+
void InitializeNode(NodeId nodeid, const CNode *pnode) {
LOCK(cs_main);
CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second;
@@ -291,6 +301,7 @@ void MarkBlockAsReceived(const uint256& hash) {
if (itInFlight != mapBlocksInFlight.end()) {
CNodeState *state = State(itInFlight->second.first);
nQueuedValidatedHeaders -= itInFlight->second.second->fValidatedHeaders;
+ state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders;
state->vBlocksInFlight.erase(itInFlight->second.second);
state->nBlocksInFlight--;
state->nStallingSince = 0;
@@ -299,17 +310,19 @@ void MarkBlockAsReceived(const uint256& hash) {
}
// Requires cs_main.
-void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, CBlockIndex *pindex = NULL) {
+void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, CBlockIndex *pindex = NULL) {
CNodeState *state = State(nodeid);
assert(state != NULL);
// Make sure it's not listed somewhere already.
MarkBlockAsReceived(hash);
- QueuedBlock newentry = {hash, pindex, GetTimeMicros(), nQueuedValidatedHeaders, pindex != NULL};
+ int64_t nNow = GetTimeMicros();
+ QueuedBlock newentry = {hash, pindex, nNow, pindex != NULL, GetBlockTimeout(nNow, nQueuedValidatedHeaders, consensusParams)};
nQueuedValidatedHeaders += newentry.fValidatedHeaders;
list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry);
state->nBlocksInFlight++;
+ state->nBlocksInFlightValidHeaders += newentry.fValidatedHeaders;
mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
}
@@ -1133,7 +1146,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
// CBlock and CBlockIndex
//
-bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
+bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
@@ -1142,7 +1155,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
// Write index header
unsigned int nSize = fileout.GetSerializeSize(block);
- fileout << FLATDATA(Params().MessageStart()) << nSize;
+ fileout << FLATDATA(messageStart) << nSize;
// Write block
long fileOutPos = ftell(fileout.Get());
@@ -1188,19 +1201,17 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
return true;
}
-CAmount GetBlockValue(int nHeight, const CAmount& nFees)
+CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
- CAmount nSubsidy = 50 * COIN;
- int halvings = nHeight / Params().SubsidyHalvingInterval();
-
+ int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
// Force block reward to zero when right shift is undefined.
if (halvings >= 64)
- return nFees;
+ return 0;
+ CAmount nSubsidy = 50 * COIN;
// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
nSubsidy >>= halvings;
-
- return nSubsidy + nFees;
+ return nSubsidy;
}
bool IsInitialBlockDownload()
@@ -1498,7 +1509,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
namespace {
-bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint256& hashBlock)
+bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
@@ -1507,7 +1518,7 @@ bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint
// Write index header
unsigned int nSize = fileout.GetSerializeSize(blockundo);
- fileout << FLATDATA(Params().MessageStart()) << nSize;
+ fileout << FLATDATA(messageStart) << nSize;
// Write undo data
long fileOutPos = ftell(fileout.Get());
@@ -1552,6 +1563,24 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CDiskBlockPos& pos, const uin
return true;
}
+/** Abort with a message */
+bool AbortNode(const std::string& strMessage, const std::string& userMessage="")
+{
+ strMiscWarning = strMessage;
+ LogPrintf("*** %s\n", strMessage);
+ uiInterface.ThreadSafeMessageBox(
+ userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
+ "", CClientUIInterface::MSG_ERROR);
+ StartShutdown();
+ return false;
+}
+
+bool AbortNode(CValidationState& state, const std::string& strMessage, const std::string& userMessage="")
+{
+ AbortNode(strMessage, userMessage);
+ return state.Error(strMessage);
+}
+
} // anon namespace
/**
@@ -1687,6 +1716,64 @@ void ThreadScriptCheck() {
scriptcheckqueue.Thread();
}
+//
+// Called periodically asynchronously; alerts if it smells like
+// we're being fed a bad chain (blocks being generated much
+// too slowly or too quickly).
+//
+void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CChain& chain, int64_t nPowTargetSpacing)
+{
+ if (initialDownloadCheck()) return;
+
+ static int64_t lastAlertTime = 0;
+ int64_t now = GetAdjustedTime();
+ if (lastAlertTime > now-60*60*24) return; // Alert at most once per day
+
+ const int SPAN_HOURS=4;
+ const int SPAN_SECONDS=SPAN_HOURS*60*60;
+ int BLOCKS_EXPECTED = SPAN_SECONDS / nPowTargetSpacing;
+
+ boost::math::poisson_distribution<double> poisson(BLOCKS_EXPECTED);
+
+ std::string strWarning;
+ int64_t startTime = GetAdjustedTime()-SPAN_SECONDS;
+
+ LOCK(cs);
+ int h = chain.Height();
+ while (h > 0 && chain[h]->GetBlockTime() >= startTime)
+ --h;
+ int nBlocks = chain.Height()-h;
+
+ // How likely is it to find that many by chance?
+ double p = boost::math::pdf(poisson, nBlocks);
+
+ LogPrint("partitioncheck", "%s : Found %d blocks in the last %d hours\n", __func__, nBlocks, SPAN_HOURS);
+ LogPrint("partitioncheck", "%s : likelihood: %g\n", __func__, p);
+
+ // Aim for one false-positive about every fifty years of normal running:
+ const int FIFTY_YEARS = 50*365*24*60*60;
+ double alertThreshold = 1.0 / (FIFTY_YEARS / SPAN_SECONDS);
+
+ if (p <= alertThreshold && nBlocks < BLOCKS_EXPECTED)
+ {
+ // Many fewer blocks than expected: alert!
+ strWarning = strprintf(_("WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)"),
+ nBlocks, SPAN_HOURS, BLOCKS_EXPECTED);
+ }
+ else if (p <= alertThreshold && nBlocks > BLOCKS_EXPECTED)
+ {
+ // Many more blocks than expected: alert!
+ strWarning = strprintf(_("WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)"),
+ nBlocks, SPAN_HOURS, BLOCKS_EXPECTED);
+ }
+ if (!strWarning.empty())
+ {
+ strMiscWarning = strWarning;
+ CAlert::Notify(strWarning, true);
+ lastAlertTime = now;
+ }
+}
+
static int64_t nTimeVerify = 0;
static int64_t nTimeConnect = 0;
static int64_t nTimeIndex = 0;
@@ -1809,10 +1896,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
int64_t nTime1 = GetTimeMicros(); nTimeConnect += nTime1 - nTimeStart;
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
- if (block.vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees))
+ CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
+ if (block.vtx[0].GetValueOut() > blockReward)
return state.DoS(100,
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
- block.vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)),
+ block.vtx[0].GetValueOut(), blockReward),
REJECT_INVALID, "bad-cb-amount");
if (!control.Wait())
@@ -1830,8 +1918,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
CDiskBlockPos pos;
if (!FindUndoPos(state, pindex->nFile, pos, ::GetSerializeSize(blockundo, SER_DISK, CLIENT_VERSION) + 40))
return error("ConnectBlock(): FindUndoPos failed");
- if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash()))
- return state.Abort("Failed to write undo data");
+ if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash(), chainparams.MessageStart()))
+ return AbortNode(state, "Failed to write undo data");
// update nUndoPos in block index
pindex->nUndoPos = pos.nPos;
@@ -1844,7 +1932,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
if (fTxIndex)
if (!pblocktree->WriteTxIndex(vPos))
- return state.Abort("Failed to write transaction index");
+ return AbortNode(state, "Failed to write transaction index");
// add this block to the view's block chain
view.SetBestBlock(pindex->GetBlockHash());
@@ -1939,7 +2027,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
setDirtyBlockIndex.erase(it++);
}
if (!pblocktree->WriteBatchSync(vFiles, nLastBlockFile, vBlocks)) {
- return state.Abort("Files to write to block index database");
+ return AbortNode(state, "Files to write to block index database");
}
}
// Finally remove any pruned files
@@ -1958,7 +2046,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
return state.Error("out of disk space");
// Flush the chainstate (which may refer to block index entries).
if (!pcoinsTip->Flush())
- return state.Abort("Failed to write to coin database");
+ return AbortNode(state, "Failed to write to coin database");
nLastFlush = nNow;
}
if ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000) {
@@ -1967,7 +2055,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
nLastSetChain = nNow;
}
} catch (const std::runtime_error& e) {
- return state.Abort(std::string("System error while flushing: ") + e.what());
+ return AbortNode(state, std::string("System error while flushing: ") + e.what());
}
return true;
}
@@ -2031,7 +2119,7 @@ bool static DisconnectTip(CValidationState &state) {
// Read block from disk.
CBlock block;
if (!ReadBlockFromDisk(block, pindexDelete))
- return state.Abort("Failed to read block");
+ return AbortNode(state, "Failed to read block");
// Apply the block atomically to the chain state.
int64_t nStart = GetTimeMicros();
{
@@ -2082,7 +2170,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
CBlock block;
if (!pblock) {
if (!ReadBlockFromDisk(block, pindexNew))
- return state.Abort("Failed to read block");
+ return AbortNode(state, "Failed to read block");
pblock = &block;
}
// Apply the block atomically to the chain state.
@@ -2753,6 +2841,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex, CDiskBlockPos* dbp)
{
+ const CChainParams& chainparams = Params();
AssertLockHeld(cs_main);
CBlockIndex *&pindex = *ppindex;
@@ -2788,12 +2877,12 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, block.GetBlockTime(), dbp != NULL))
return error("AcceptBlock(): FindBlockPos failed");
if (dbp == NULL)
- if (!WriteBlockToDisk(block, blockPos))
- return state.Abort("Failed to write block");
+ if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart()))
+ AbortNode(state, "Failed to write block");
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
return error("AcceptBlock(): ReceivedBlockTransactions failed");
} catch (const std::runtime_error& e) {
- return state.Abort(std::string("System error: ") + e.what());
+ return AbortNode(state, std::string("System error: ") + e.what());
}
if (fCheckForPruning)
@@ -2868,24 +2957,6 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
return true;
}
-
-
-
-
-
-
-
-bool AbortNode(const std::string &strMessage, const std::string &userMessage) {
- strMiscWarning = strMessage;
- LogPrintf("*** %s\n", strMessage);
- uiInterface.ThreadSafeMessageBox(
- userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
- "", CClientUIInterface::MSG_ERROR);
- StartShutdown();
- return false;
-}
-
-
/**
* BLOCK PRUNING CODE
*/
@@ -3296,6 +3367,7 @@ bool LoadBlockIndex()
bool InitBlockIndex() {
+ const CChainParams& chainparams = Params();
LOCK(cs_main);
// Check whether we're already initialized
if (chainActive.Genesis() != NULL)
@@ -3316,7 +3388,7 @@ bool InitBlockIndex() {
CValidationState state;
if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.GetBlockTime()))
return error("LoadBlockIndex(): FindBlockPos failed");
- if (!WriteBlockToDisk(block, blockPos))
+ if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart()))
return error("LoadBlockIndex(): writing genesis block to disk failed");
CBlockIndex *pindex = AddToBlockIndex(block);
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
@@ -4111,7 +4183,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
vToFetch.push_back(inv);
// Mark block as in flight already, even though the actual "getdata" message only goes out
// later (within the same cs_main lock, though).
- MarkBlockAsInFlight(pfrom->GetId(), inv.hash);
+ MarkBlockAsInFlight(pfrom->GetId(), inv.hash, chainparams.GetConsensus());
}
LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
}
@@ -4957,9 +5029,22 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
// timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link
// being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
// to unreasonably increase our timeout.
- if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * consensusParams.nPowTargetSpacing * (4 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
- LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id);
- pto->fDisconnect = true;
+ // We also compare the block download timeout originally calculated against the time at which we'd disconnect
+ // if we assumed the block were being requested now (ignoring blocks we've requested from this peer, since we're
+ // only looking at this peer's oldest request). This way a large queue in the past doesn't result in a
+ // permanently large window for this block to be delivered (ie if the number of blocks in flight is decreasing
+ // more quickly than once every 5 minutes, then we'll shorten the download window for this block).
+ if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0) {
+ QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
+ int64_t nTimeoutIfRequestedNow = GetBlockTimeout(nNow, nQueuedValidatedHeaders - state.nBlocksInFlightValidHeaders, consensusParams);
+ if (queuedBlock.nTimeDisconnect > nTimeoutIfRequestedNow) {
+ LogPrint("net", "Reducing block download timeout for peer=%d block=%s, orig=%d new=%d\n", pto->id, queuedBlock.hash.ToString(), queuedBlock.nTimeDisconnect, nTimeoutIfRequestedNow);
+ queuedBlock.nTimeDisconnect = nTimeoutIfRequestedNow;
+ }
+ if (queuedBlock.nTimeDisconnect < nNow) {
+ LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id);
+ pto->fDisconnect = true;
+ }
}
//
@@ -4972,7 +5057,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller);
BOOST_FOREACH(CBlockIndex *pindex, vToDownload) {
vGetData.push_back(CInv(MSG_BLOCK, pindex->GetBlockHash()));
- MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), pindex);
+ MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex);
LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
pindex->nHeight, pto->id);
}
diff --git a/src/main.h b/src/main.h
index fcbc4075d2..9bf7bbb2f8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -89,16 +89,6 @@ static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60;
/** Maximum length of reject messages. */
static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
-/** "reject" message codes */
-static const unsigned char REJECT_MALFORMED = 0x01;
-static const unsigned char REJECT_INVALID = 0x10;
-static const unsigned char REJECT_OBSOLETE = 0x11;
-static const unsigned char REJECT_DUPLICATE = 0x12;
-static const unsigned char REJECT_NONSTANDARD = 0x40;
-static const unsigned char REJECT_DUST = 0x41;
-static const unsigned char REJECT_INSUFFICIENTFEE = 0x42;
-static const unsigned char REJECT_CHECKPOINT = 0x43;
-
struct BlockHasher
{
size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); }
@@ -194,6 +184,8 @@ bool ProcessMessages(CNode* pfrom);
bool SendMessages(CNode* pto, bool fSendTrickle);
/** Run an instance of the script checking thread */
void ThreadScriptCheck();
+/** Try to detect Partition (network isolation) attacks against us */
+void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CChain& chain, int64_t nPowTargetSpacing);
/** Check whether we are doing an initial block download (synchronizing from disk or network) */
bool IsInitialBlockDownload();
/** Format a string that describes several potential problems detected by the core */
@@ -202,7 +194,7 @@ std::string GetWarnings(std::string strFor);
bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, bool fAllowSlow = false);
/** Find the best known block, and make it the tip of the block chain */
bool ActivateBestChain(CValidationState &state, CBlock *pblock = NULL);
-CAmount GetBlockValue(int nHeight, const CAmount& nFees);
+CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
/**
* Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.
@@ -228,8 +220,6 @@ void UnlinkPrunedFiles(std::set<int>& setFilesToPrune);
/** Create a new block index entry for a given block hash */
CBlockIndex * InsertBlockIndex(uint256 hash);
-/** Abort with a message */
-bool AbortNode(const std::string &msg, const std::string &userMessage="");
/** Get statistics from node state */
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
/** Increase a node's misbehavior score. */
@@ -372,7 +362,7 @@ public:
/** Functions for disk access for blocks */
-bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos);
+bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart);
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos);
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
@@ -459,69 +449,6 @@ public:
}
};
-/** Capture information about block/transaction validation */
-class CValidationState {
-private:
- enum mode_state {
- MODE_VALID, //! everything ok
- MODE_INVALID, //! network rule violation (DoS value may be set)
- MODE_ERROR, //! run-time error
- } mode;
- int nDoS;
- std::string strRejectReason;
- unsigned char chRejectCode;
- bool corruptionPossible;
-public:
- CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {}
- bool DoS(int level, bool ret = false,
- unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
- bool corruptionIn=false) {
- chRejectCode = chRejectCodeIn;
- strRejectReason = strRejectReasonIn;
- corruptionPossible = corruptionIn;
- if (mode == MODE_ERROR)
- return ret;
- nDoS += level;
- mode = MODE_INVALID;
- return ret;
- }
- bool Invalid(bool ret = false,
- unsigned char _chRejectCode=0, std::string _strRejectReason="") {
- return DoS(0, ret, _chRejectCode, _strRejectReason);
- }
- bool Error(std::string strRejectReasonIn="") {
- if (mode == MODE_VALID)
- strRejectReason = strRejectReasonIn;
- mode = MODE_ERROR;
- return false;
- }
- bool Abort(const std::string &msg) {
- AbortNode(msg);
- return Error(msg);
- }
- bool IsValid() const {
- return mode == MODE_VALID;
- }
- bool IsInvalid() const {
- return mode == MODE_INVALID;
- }
- bool IsError() const {
- return mode == MODE_ERROR;
- }
- bool IsInvalid(int &nDoSOut) const {
- if (IsInvalid()) {
- nDoSOut = nDoS;
- return true;
- }
- return false;
- }
- bool CorruptionPossible() const {
- return corruptionPossible;
- }
- unsigned char GetRejectCode() const { return chRejectCode; }
- std::string GetRejectReason() const { return strRejectReason; }
-};
-
/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
class CVerifyDB {
public:
diff --git a/src/miner.cpp b/src/miner.cpp
index 4bceb7d7b4..7a57b42e30 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -8,6 +8,7 @@
#include "amount.h"
#include "chainparams.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "hash.h"
#include "main.h"
#include "net.h"
@@ -91,6 +92,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
{
+ const CChainParams& chainparams = Params();
// Create new block
auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
if(!pblocktemplate.get())
@@ -320,7 +322,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
// Compute final coinbase transaction.
- txNew.vout[0].nValue = GetBlockValue(nHeight, nFees);
+ txNew.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
pblock->vtx[0] = txNew;
pblocktemplate->vTxFees[0] = -nFees;
diff --git a/src/net.cpp b/src/net.cpp
index 6849d79263..3908be6824 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1363,7 +1363,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
FindNode(addrConnect.ToStringIPPort()))
return false;
- } else if (FindNode(pszDest))
+ } else if (FindNode(std::string(pszDest)))
return false;
CNode* pnode = ConnectNode(addrConnect, pszDest);
@@ -1385,7 +1385,7 @@ void ThreadMessageHandler()
{
boost::mutex condition_mutex;
boost::unique_lock<boost::mutex> lock(condition_mutex);
-
+
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
while (true)
{
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 2015d0271a..e3cb4e706f 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -35,8 +35,6 @@
#define MSG_NOSIGNAL 0
#endif
-using namespace std;
-
// Settings
static proxyType proxyInfo[NET_MAX];
static proxyType nameProxy;
@@ -597,13 +595,13 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, b
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
{
- string strDest;
+ std::string strDest;
int port = portDefault;
if (outProxyConnectionFailed)
*outProxyConnectionFailed = false;
- SplitHostPort(string(pszDest), port, strDest);
+ SplitHostPort(std::string(pszDest), port, strDest);
proxyType nameProxy;
GetNameProxy(nameProxy);
@@ -1252,15 +1250,15 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
std::string strNetmask = strSubnet.substr(slash + 1);
int32_t n;
// IPv4 addresses start at offset 12, and first 12 bytes must match, so just offset n
- int noffset = network.IsIPv4() ? (12 * 8) : 0;
+ const int astartofs = network.IsIPv4() ? 12 : 0;
if (ParseInt32(strNetmask, &n)) // If valid number, assume /24 symtex
{
- if(n >= 0 && n <= (128 - noffset)) // Only valid if in range of bits of address
+ if(n >= 0 && n <= (128 - astartofs*8)) // Only valid if in range of bits of address
{
- n += noffset;
+ n += astartofs*8;
// Clear bits [n..127]
for (; n < 128; ++n)
- netmask[n>>3] &= ~(1<<(n&7));
+ netmask[n>>3] &= ~(1<<(7-(n&7)));
}
else
{
@@ -1271,12 +1269,10 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
{
if (LookupHost(strNetmask.c_str(), vIP, 1, false)) // Never allow lookup for netmask
{
- // Remember: GetByte returns bytes in reversed order
// Copy only the *last* four bytes in case of IPv4, the rest of the mask should stay 1's as
// we don't want pchIPv4 to be part of the mask.
- int asize = network.IsIPv4() ? 4 : 16;
- for(int x=0; x<asize; ++x)
- netmask[15-x] = vIP[0].GetByte(x);
+ for(int x=astartofs; x<16; ++x)
+ netmask[x] = vIP[0].ip[x];
}
else
{
@@ -1289,6 +1285,10 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
{
valid = false;
}
+
+ // Normalize network according to netmask
+ for(int x=0; x<16; ++x)
+ network.ip[x] &= netmask[x];
}
bool CSubNet::Match(const CNetAddr &addr) const
@@ -1296,7 +1296,7 @@ bool CSubNet::Match(const CNetAddr &addr) const
if (!valid || !addr.IsValid())
return false;
for(int x=0; x<16; ++x)
- if ((addr.GetByte(x) & netmask[15-x]) != network.GetByte(x))
+ if ((addr.ip[x] & netmask[x]) != network.ip[x])
return false;
return true;
}
diff --git a/src/netbase.h b/src/netbase.h
index 6d2ca4afb2..1f2957116e 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -100,6 +100,8 @@ class CNetAddr
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
READWRITE(FLATDATA(ip));
}
+
+ friend class CSubNet;
};
class CSubNet
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 70bf894599..efba0f5e18 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -414,6 +414,7 @@ void BitcoinGUI::createToolBars()
if(walletFrame)
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
+ toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index a2e4c376b8..235b22cd1f 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -765,11 +765,7 @@
<source>Your current total balance</source>
<translation>رصيدك الكلي الحالي</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>خارج المزامنه</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 6db3f58061..b727b75566 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -102,7 +102,7 @@
<name>AddressTableModel</name>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Address</source>
@@ -383,6 +383,10 @@
<translation>Дапамога</translation>
</message>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
<translation>Запатрабаваць плацёж (генеруецца QR-код для біткойн URI)</translation>
</message>
@@ -403,9 +407,17 @@
<translation>Паказаць спіс адрасоў і метак для прымання</translation>
</message>
<message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Адкрыць біткойн: URI ці запыт плацяжу</translation>
+ </message>
+ <message>
<source>&amp;Command-line options</source>
<translation>Опцыі каманднага радка</translation>
</message>
+ <message>
+ <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Паказваць даведку Bitcoin Core каб атрымаць спіс магчымых опцый каманднага радка</translation>
+ </message>
<message numerus="yes">
<source>%n active connection(s) to Bitcoin network</source>
<translation><numerusform>%n актыўнае злучэнне з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform></translation>
@@ -430,6 +442,10 @@
<source>%n week(s)</source>
<translation><numerusform>%n тыдзень</numerusform><numerusform>%n тыдні</numerusform><numerusform>%n тыдняў</numerusform><numerusform>%n тыдняў</numerusform></translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 і %2</translation>
+ </message>
<message numerus="yes">
<source>%n year(s)</source>
<translation><numerusform>%n год</numerusform><numerusform>%n гады</numerusform><numerusform>%n гадоў</numerusform><numerusform>%n гадоў</numerusform></translation>
@@ -523,6 +539,10 @@
<context>
<name>CoinControlDialog</name>
<message>
+ <source>Quantity:</source>
+ <translation>Колькасць:</translation>
+ </message>
+ <message>
<source>Bytes:</source>
<translation>Байтаў:</translation>
</message>
@@ -547,6 +567,10 @@
<translation>Пасля камісіі:</translation>
</message>
<message>
+ <source>(un)select all</source>
+ <translation>(не)выбраць ўсё</translation>
+ </message>
+ <message>
<source>Tree mode</source>
<translation>Рэжым дрэва</translation>
</message>
@@ -559,6 +583,14 @@
<translation>Колькасць</translation>
</message>
<message>
+ <source>Received with label</source>
+ <translation>Прыняць праз метку</translation>
+ </message>
+ <message>
+ <source>Received with address</source>
+ <translation>Прыняць праз адрас</translation>
+ </message>
+ <message>
<source>Date</source>
<translation>Дата</translation>
</message>
@@ -591,6 +623,38 @@
<translation>Капіяваць ID транзакцыі</translation>
</message>
<message>
+ <source>Lock unspent</source>
+ <translation>Замкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Адамкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy priority</source>
+ <translation>Капіяваць прыярытэт</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
+ <message>
<source>highest</source>
<translation>найвышэйшы</translation>
</message>
@@ -635,6 +699,14 @@
<translation>не</translation>
</message>
<message>
+ <source>This means a fee of at least %1 per kB is required.</source>
+ <translation>Гэта значыць патрэбную камісію мінімум %1 на Кб.</translation>
+ </message>
+ <message>
+ <source>Transactions with higher priority are more likely to get included into a block.</source>
+ <translation>Транзакцыя большага прыярытэту больш прываблівая для ўключэння ў блок.</translation>
+ </message>
+ <message>
<source>(no label)</source>
<translation>непазначаны</translation>
</message>
@@ -647,7 +719,7 @@
</message>
<message>
<source>&amp;Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>&amp;Address</source>
@@ -684,10 +756,26 @@
</context>
<context>
<name>FreespaceChecker</name>
+ <message>
+ <source>A new data directory will be created.</source>
+ <translation>Будзе створаны новы каталог з данымі.</translation>
+ </message>
+ <message>
+ <source>name</source>
+ <translation>імя</translation>
+ </message>
+ <message>
+ <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <translation>Каталог ужо існуе. Дадайце %1 калі вы збіраецеся стварыць тут новы каталог.</translation>
+ </message>
</context>
<context>
<name>HelpMessageDialog</name>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>(%1-bit)</source>
<translation>(%1-біт)</translation>
</message>
@@ -719,6 +807,10 @@
<translation>Вітаем у Bitcoin Core.</translation>
</message>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Памылка</translation>
</message>
@@ -779,7 +871,7 @@
<name>ReceiveCoinsDialog</name>
<message>
<source>&amp;Label:</source>
- <translation>Пазнака:</translation>
+ <translation>Метка:</translation>
</message>
<message>
<source>Copy label</source>
@@ -802,7 +894,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Message</source>
@@ -817,7 +909,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Message</source>
@@ -839,6 +931,10 @@
<translation>Даслаць Манеты</translation>
</message>
<message>
+ <source>Quantity:</source>
+ <translation>Колькасць:</translation>
+ </message>
+ <message>
<source>Bytes:</source>
<translation>Байтаў:</translation>
</message>
@@ -879,10 +975,30 @@
<translation>Пацвердзіць дасыланне манет</translation>
</message>
<message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
<source>Copy amount</source>
<translation>Капіяваць колькасць</translation>
</message>
<message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy priority</source>
+ <translation>Капіяваць прыярытэт</translation>
+ </message>
+ <message>
<source>The amount to pay must be larger than 0.</source>
<translation>Велічыня плацяжу мае быць больш за 0.</translation>
</message>
@@ -890,6 +1006,10 @@
<source>(no label)</source>
<translation>непазначаны</translation>
</message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -907,7 +1027,7 @@
</message>
<message>
<source>&amp;Label:</source>
- <translation>Пазнака:</translation>
+ <translation>Метка:</translation>
</message>
<message>
<source>Alt+A</source>
@@ -947,6 +1067,10 @@
<context>
<name>SplashScreen</name>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>The Bitcoin Core developers</source>
<translation>Распрацоўнікі Bitcoin Core</translation>
</message>
@@ -1044,7 +1168,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Received with</source>
@@ -1187,7 +1311,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Address</source>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 2ef1c7160f..c86fdd42dd 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1009,11 +1009,7 @@
<source>Recent transactions</source>
<translation>Скорошни транзакции</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>несинхронизиран</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 37d1dfc9eb..f7d97eb061 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 0a52b1bc9a..c68cfb686a 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1073,10 +1073,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 3baa6e00cd..cd6aa96d34 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index b4d9ca146d..47464b7a53 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Aktuální stav účtu sledovaných adres</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesynchronizováno</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 6979124615..1467791047 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1211,10 +1211,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nuværende totalsaldo på kigge-adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ikke synkroniseret</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2922,7 +2918,7 @@
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
- <translation>Ønsker du at genbygge blokdatabasen nu?</translation>
+ <translation>Ønsker du at genopbygge blokdatabasen nu?</translation>
</message>
<message>
<source>Error initializing block database</source>
@@ -3162,7 +3158,7 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
</message>
<message>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
- <translation>Du er nødt til at genbygge databasen ved hjælp af -reindex for at gå tilbage til ikke-beskåret tilstand. Dette vil downloade hele blokkæden igen</translation>
+ <translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex for at gå tilbage til ikke-beskåret tilstand. Dette vil downloade hele blokkæden igen</translation>
</message>
<message>
<source>(default: %u)</source>
@@ -3281,6 +3277,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slør tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Genopbyg blokkædeindeks fra nuværende blk000??.dat-filer ved opstart</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Send sporings-/fejlsøgningsinformation til konsollen i stedet for debug.log filen</translation>
</message>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 263852fad2..ab0367dbab 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Aktueller Gesamtbetrag in beobachteten Adressen aus obigen Kategorien</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nicht synchron</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2164,6 +2160,10 @@
<translation>Nachricht &amp;signieren</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>Sie können Nachrichten/Vereinbarungen mit Hilfe Ihrer Adressen signieren, um zu beweisen, dass Sie Bitcoins empfangen können, die an diese Adressen überwiesen werden. Seien Sie vorsichtig und signieren Sie nichts Vages oder Willkürliches, um Ihre Indentität vor Phishingangriffen zu schützen. Signieren Sie nur vollständig-detaillierte Aussagen, mit denen Sie auch einverstanden sind.</translation>
+ </message>
+ <message>
<source>The Bitcoin address to sign the message with</source>
<translation>Die Bitcoin-Adresse mit der die Nachricht signiert wird</translation>
</message>
@@ -2216,6 +2216,10 @@
<translation>Nachricht &amp;verifizieren</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>Geben Sie die Zahlungsadresse des Empfängers, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur hinein, als in der signierten Nachricht selber enthalten ist, um nicht von einem Man-in-the-middle-Angriff hinters Licht geführt zu werden. Beachten Sie dass dies nur beweißt, dass die signierende Partei über diese Adresse Überweisungen empfangen kann.</translation>
+ </message>
+ <message>
<source>The Bitcoin address the message was signed with</source>
<translation>Die Bitcoin-Adresse mit der die Nachricht signiert wurde</translation>
</message>
@@ -2841,6 +2845,10 @@
<translation>Maximale Gesamtgebühren je Wallet-Transaktion, ein zu niedriger Wert kann große Transaktionen abbrechen (Standard: %s)</translation>
</message>
<message>
+ <source>Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
+ <translation>Speicherplatzanforderung durch kürzen (löschen) alter Blöcke reduzieren. Dieser Modus deaktiviert die Wallet-Unterstützung und ist nicht mit -txindex kompatibel. Warnung: Die Umkehr dieser Einstellung erfordert das erneute Herunterladen der gesamten Blockkette. (Standard: 0 = deaktiviert das Kürzen von Blöcken, &gt;%u = Zielgröße in MiB, die für Blockdateien verwendet werden darf)</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (%u bis %d, 0 = automatisch, &lt;0 = so viele Kerne frei lassen, Standard: %d)</translation>
</message>
@@ -2969,6 +2977,14 @@
<translation>Nur zu Knoten des Netzwerktyps &lt;net&gt; verbinden (ipv4, ipv6 oder onion)</translation>
</message>
<message>
+ <source>Prune cannot be configured with a negative value.</source>
+ <translation>Kürzungsmodus kann nicht mit einem negativen Wert konfiguriert werden.</translation>
+ </message>
+ <message>
+ <source>Prune mode is incompatible with -txindex.</source>
+ <translation>Kürzungsmodus ist nicht mit -txindex kompatibel.</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Größe des Datenbankcaches in Megabyte festlegen (%d bis %d, Standard: %d)</translation>
</message>
@@ -3077,6 +3093,10 @@
<translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</translation>
</message>
<message>
+ <source>Prune configured below the minimum of %d MB. Please use a higher number.</source>
+ <translation>Kürzungsmodus wurde kleiner als das Minimum in Höhe von %d MiB konfiguriert. Bitte verwenden Sie einen größeren Wert.</translation>
+ </message>
+ <message>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation>Adressen von Gegenstellen via DNS-Namensauflösung finden, falls zu wenige Adressen verfügbar sind (Standard: 1, außer bei -connect)</translation>
</message>
@@ -3141,6 +3161,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Erlaubte Gegenstellen werden nicht für DoS-Attacken gesperrt und ihre Transkationen werden immer weitergeleitet, auch wenn sie sich bereits im Speicherpool befinden, was z.B. für Gateways sinnvoll ist.</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>
+ <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um zum ungekürzten Modus zurückzukehren. Dies erfordert, dass die gesamte Blockkette erneut heruntergeladen wird.</translation>
+ </message>
+ <message>
<source>(default: %u)</source>
<translation>(Standard: %u)</translation>
</message>
@@ -3157,6 +3181,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Selbstunterschriebene Stammzertifikate erlauben (Standard: 0)</translation>
</message>
<message>
+ <source>Can't run with a wallet in prune mode.</source>
+ <translation>Eine Wallet kann im Kürzungsmodus nicht verwendet werden.</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>Kann Adresse in -whitebind nicht auflösen: '%s'</translation>
</message>
@@ -3253,6 +3281,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwürfeln</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat beim Starten wiederaufbauen</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Rückverfolgungs- und Debuginformationen an die Konsole senden, anstatt sie in debug.log zu schreiben</translation>
</message>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 5cabe43032..a4c95857ba 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -2,6 +2,10 @@
<context>
<name>AddressBookPage</name>
<message>
+ <source>Right-click to edit address or label</source>
+ <translation>Δεξί-κλικ για επεξεργασία της διεύθυνσης ή της ετικέτας</translation>
+ </message>
+ <message>
<source>Create a new address</source>
<translation>Δημιουργία νέας διεύθυνσης</translation>
</message>
@@ -881,10 +885,18 @@
<translation>Διεύθυνση IP του διαμεσολαβητή (π.χ. 127.0.0.1 / IPv6: ::1)</translation>
</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>URLs από τρίτους (π.χ. ένας εξερευνητής μπλοκ) τα οποία εμφανίζονται στην καρτέλα συναλλαγών ως στοιχεία μενού. Το %s στα URL αντικαθιστάται από την τιμή της κατατεμαχισμένης συναλλαγής.</translation>
+ </message>
+ <message>
<source>Third party transaction URLs</source>
<translation>Διευθύνσεις τρίτων συναλλαγών.</translation>
</message>
<message>
+ <source>Active command-line options that override above options:</source>
+ <translation>Ενεργές επιλογές γραμμής-εντολών που παρακάμπτουν τις παραπάνω επιλογές:</translation>
+ </message>
+ <message>
<source>Reset all client options to default.</source>
<translation>Επαναφορα όλων των επιλογων του πελάτη σε default.</translation>
</message>
@@ -897,6 +909,10 @@
<translation>&amp;Δίκτυο</translation>
</message>
<message>
+ <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+ <translation>(0 = αυτόματο, &lt;0 = ελεύθεροι πυρήνες)</translation>
+ </message>
+ <message>
<source>W&amp;allet</source>
<translation>Π&amp;ορτοφόλι</translation>
</message>
@@ -909,6 +925,14 @@
<translation>Επιλογή κατα πόσο να αναδείχνονται οι δυνατότητες ελέγχου κερμάτων.</translation>
</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>Εάν απενεργοποιήσετε το ξόδεμα μη επικυρωμένων ρέστων, τα ρέστα από μια συναλλαγή δεν μπορούν να χρησιμοποιηθούν έως ότου αυτή η συναλλαγή έχει έστω μια επικύρωση. Αυτό επίσης επηρεάζει το πως υπολογίζεται το υπόλοιπό σας.</translation>
+ </message>
+ <message>
+ <source>&amp;Spend unconfirmed change</source>
+ <translation>&amp;Ξόδεμα μη επικυρωμένων ρέστων</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>
<translation>Αυτόματο άνοιγμα των θυρών Bitcoin στον δρομολογητή. Λειτουργεί μόνο αν ο δρομολογητής σας υποστηρίζει τη λειτουργία UPnP.</translation>
</message>
@@ -1057,6 +1081,10 @@
<translation>Το τρέχον συνολικό υπόλοιπο</translation>
</message>
<message>
+ <source>Your current balance in watch-only addresses</source>
+ <translation>Το τρέχον υπόλοιπο σας σε διευθύνσεις παρακολούθησης μόνο</translation>
+ </message>
+ <message>
<source>Spendable:</source>
<translation>Ξοδεμένα:</translation>
</message>
@@ -1065,8 +1093,16 @@
<translation>Πρόσφατες συναλλαγές</translation>
</message>
<message>
- <source>out of sync</source>
- <translation>εκτός συγχρονισμού</translation>
+ <source>Unconfirmed transactions to watch-only addresses</source>
+ <translation>Μη επικυρωμένες συναλλαγές σε διευθύνσεις παρακολούθησης μόνο</translation>
+ </message>
+ <message>
+ <source>Mined balance in watch-only addresses that has not yet matured</source>
+ <translation>Εξορυγμένο υπόλοιπο σε διευθύνσεις παρακολούθησης μόνο που δεν έχει ωριμάσει ακόμα</translation>
+ </message>
+ <message>
+ <source>Current total balance in watch-only addresses</source>
+ <translation>Το τρέχον συνολικό υπόλοιπο σε διευθύνσεις παρακολούθησης μόνο</translation>
</message>
</context>
<context>
@@ -1088,6 +1124,10 @@
<translation>Η αίτηση πληρωμής δεν έχει αρχίζει ακόμα.</translation>
</message>
<message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Το ζητούμενο ποσό πληρωμής του %1 είναι πολύ μικρό (θεωρείται σκόνη)</translation>
+ </message>
+ <message>
<source>Payment request error</source>
<translation>Σφάλμα αιτήματος πληρωμής</translation>
</message>
@@ -1108,6 +1148,18 @@
<translation>Επιστροφή ποσού από %1</translation>
</message>
<message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Σφάλμα επικοινωνίας με %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Η αίτηση πληρωμής δεν μπορεί να αναλυθεί!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Κακή απάντηση από διακομιστή %1</translation>
+ </message>
+ <message>
<source>Payment acknowledged</source>
<translation>Πληρωμή αναγνωρίστηκε</translation>
</message>
@@ -1212,6 +1264,10 @@
<translation>Χρησιμοποιηση της OpenSSL εκδοσης</translation>
</message>
<message>
+ <source>Using BerkeleyDB version</source>
+ <translation>Χρήση BerkeleyDB έκδοσης</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Χρόνος εκκίνησης</translation>
</message>
@@ -1240,6 +1296,18 @@
<translation>Παραλήφθησαν</translation>
</message>
<message>
+ <source>Sent</source>
+ <translation>Αποστολή</translation>
+ </message>
+ <message>
+ <source>&amp;Peers</source>
+ <translation>&amp;Χρήστες</translation>
+ </message>
+ <message>
+ <source>Select a peer to view detailed information.</source>
+ <translation>Επιλέξτε ένα χρήστη για να δείτε αναλυτικές πληροφορίες.</translation>
+ </message>
+ <message>
<source>Version</source>
<translation>Έκδοση</translation>
</message>
@@ -1248,6 +1316,38 @@
<translation>Υπηρεσίες</translation>
</message>
<message>
+ <source>Starting Height</source>
+ <translation>Αρχικό ύψος</translation>
+ </message>
+ <message>
+ <source>Sync Height</source>
+ <translation>Ύψος συγχονισμού</translation>
+ </message>
+ <message>
+ <source>Ban Score</source>
+ <translation>Σκορ αποκλησμού</translation>
+ </message>
+ <message>
+ <source>Connection Time</source>
+ <translation>Χρόνος σύνδεσης</translation>
+ </message>
+ <message>
+ <source>Last Send</source>
+ <translation>Τελευταία αποστολή</translation>
+ </message>
+ <message>
+ <source>Last Receive</source>
+ <translation>Τελευταία λήψη</translation>
+ </message>
+ <message>
+ <source>Bytes Sent</source>
+ <translation>Σταλθέντα bytes</translation>
+ </message>
+ <message>
+ <source>Bytes Received</source>
+ <translation>Ληφθέντα bytes</translation>
+ </message>
+ <message>
<source>Ping Time</source>
<translation>Χρόνος καθυστέρησης</translation>
</message>
@@ -1339,7 +1439,11 @@
<source>Unknown</source>
<translation>Άγνωστο(α)</translation>
</message>
- </context>
+ <message>
+ <source>Fetching...</source>
+ <translation>Ανάκτηση...</translation>
+ </message>
+</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
@@ -1355,6 +1459,10 @@
<translation>&amp;Μήνυμα:</translation>
</message>
<message>
+ <source>R&amp;euse an existing receiving address (not recommended)</source>
+ <translation>Ε&amp;παναχρησιμοποίηση υπάρχουσας διεύθυνσης λήψης (δεν συνιστάται)</translation>
+ </message>
+ <message>
<source>Clear all fields of the form.</source>
<translation>Καθαρισμός όλων των πεδίων της φόρμας.</translation>
</message>
@@ -1371,6 +1479,10 @@
<translation>Εμφάνιση</translation>
</message>
<message>
+ <source>Remove the selected entries from the list</source>
+ <translation>Αφαίρεση επιλεγμένων καταχωρίσεων από τη λίστα</translation>
+ </message>
+ <message>
<source>Remove</source>
<translation>Αφαίρεση</translation>
</message>
@@ -1398,10 +1510,18 @@
<translation>Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος</translation>
</message>
<message>
+ <source>Copy &amp;Address</source>
+ <translation>Αντιγραφή &amp;Διεύθυνσης</translation>
+ </message>
+ <message>
<source>&amp;Save Image...</source>
<translation>&amp;Αποθήκευση εικόνας...</translation>
</message>
<message>
+ <source>Request payment to %1</source>
+ <translation>Αίτηση πληρωμής για %1</translation>
+ </message>
+ <message>
<source>Payment information</source>
<translation>Πληροφορίες πληρωμής</translation>
</message>
@@ -1476,6 +1596,10 @@
<translation>Χαρακτηρηστικά επιλογής κερμάτων</translation>
</message>
<message>
+ <source>Inputs...</source>
+ <translation>Εισροές...</translation>
+ </message>
+ <message>
<source>automatically selected</source>
<translation>επιλεγμένο αυτόματα</translation>
</message>
@@ -1512,6 +1636,14 @@
<translation>Ρέστα:</translation>
</message>
<message>
+ <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
+ <translation>Όταν ενεργό, αλλά η διεύθυνση ρέστων είναι κενή ή άκυρη, τα ρέστα θα σταλούν σε μία πρόσφατα δημιουργημένη διεύθυνση.</translation>
+ </message>
+ <message>
+ <source>Custom change address</source>
+ <translation>Προσαρμοσμένη διεύθυνση ρέστων</translation>
+ </message>
+ <message>
<source>Transaction Fee:</source>
<translation>Τέλος συναλλαγής:</translation>
</message>
@@ -1520,10 +1652,34 @@
<translation>Επιλογή...</translation>
</message>
<message>
+ <source>per kilobyte</source>
+ <translation>ανά kilobyte</translation>
+ </message>
+ <message>
+ <source>Recommended:</source>
+ <translation>Προτεινόμενο: </translation>
+ </message>
+ <message>
+ <source>Custom:</source>
+ <translation>Προσαρμογή:</translation>
+ </message>
+ <message>
+ <source>Confirmation time:</source>
+ <translation>Χρόνος επικύρωσης:</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>κανονικό</translation>
+ </message>
+ <message>
<source>fast</source>
<translation>Γρήγορο</translation>
</message>
<message>
+ <source>(confirmation may take longer)</source>
+ <translation>(η επικύρωση ίσως χρειαστεί περισσότερο χρόνο)</translation>
+ </message>
+ <message>
<source>Send to multiple recipients at once</source>
<translation>Αποστολή σε πολλούς αποδέκτες ταυτόχρονα</translation>
</message>
@@ -1659,6 +1815,14 @@
<translation>Επιλογή διεύθυνσης που έχει ήδη χρησιμοποιηθεί</translation>
</message>
<message>
+ <source>This is a normal payment.</source>
+ <translation>Αυτή είναι μια απλή πληρωμή.</translation>
+ </message>
+ <message>
+ <source>The Bitcoin address to send the payment to</source>
+ <translation>Η διεύθυνση Bitcoin που θα σταλεί η πληρωμή</translation>
+ </message>
+ <message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
@@ -1679,6 +1843,10 @@
<translation>Μήνυμα:</translation>
</message>
<message>
+ <source>Enter a label for this address to add it to the list of used addresses</source>
+ <translation>Εισάγεται μία ετικέτα για αυτή την διεύθυνση για να προστεθεί στη λίστα με τις χρησιμοποιημένες διευθύνσεις</translation>
+ </message>
+ <message>
<source>Pay To:</source>
<translation>Πληρωμή σε:</translation>
</message>
@@ -2191,6 +2359,10 @@
<translation>Επιτυχής εξαγωγή</translation>
</message>
<message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Το ιστορικό συναλλαγών αποθηκεύτηκε επιτυχώς στο %1.</translation>
+ </message>
+ <message>
<source>Comma separated file (*.csv)</source>
<translation>Αρχείο οριοθετημένο με κόμματα (*.csv)</translation>
</message>
@@ -2229,7 +2401,11 @@
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
- </context>
+ <message>
+ <source>Unit to show amounts in. Click to select another unit.</source>
+ <translation>Μονάδα μέτρησης προβολής ποσών. Κάντε κλικ για επιλογή άλλης μονάδας.</translation>
+ </message>
+</context>
<context>
<name>WalletFrame</name>
<message>
@@ -2267,6 +2443,10 @@
<translation>Αποτυχία κατά τη δημιουργία αντιγράφου</translation>
</message>
<message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Παρουσιάστηκε σφάλμα κατά την αποθήκευση των δεδομένων πορτοφολιού στο %1.</translation>
+ </message>
+ <message>
<source>The wallet data was successfully saved to %1.</source>
<translation>Τα δεδομένα πορτοφολιού αποθηκεύτηκαν με επιτυχία στο %1.</translation>
</message>
@@ -2314,6 +2494,10 @@
<translation>Αποθηκευση σε συγκεκριμένη διεύθυνση. Χρησιμοποιήστε τα πλήκτρα [Host] : συμβολισμός θύρα για IPv6</translation>
</message>
<message>
+ <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+ <translation>Εισαγωγή δοκιμαστικής λειτουργίας παλινδρόμησης, που χρησιμοποιεί μια ειδική αλυσίδα στην οποία τα μπλοκ επιλύονται στιγμιαία.</translation>
+ </message>
+ <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
</message>
@@ -2402,10 +2586,18 @@
<translation>Δεν ειναι αρκετες περιγραφες αρχείων διαθέσιμες.</translation>
</message>
<message>
+ <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+ <translation>Μόνο σύνδεση σε κόμβους του δικτύου &lt;net&gt; (ipv4, ipv6 ή onion)</translation>
+ </message>
+ <message>
<source>Specify wallet file (within data directory)</source>
<translation>Επιλέξτε αρχείο πορτοφολιού (μέσα απο κατάλογο δεδομένων)</translation>
</message>
<message>
+ <source>This is intended for regression testing tools and app development.</source>
+ <translation>Αυτό προορίζεται για εργαλεία δοκιμών παλινδρόμησης και την ανάπτυξη εφαρμογών.</translation>
+ </message>
+ <message>
<source>Verifying blocks...</source>
<translation>Επαλήθευση των μπλοκ... </translation>
</message>
@@ -2414,6 +2606,10 @@
<translation>Επαλήθευση πορτοφολιου... </translation>
</message>
<message>
+ <source>Wallet %s resides outside data directory %s</source>
+ <translation>Το πορτοφόλι %s βρίσκεται έξω από το φάκελο δεδομένων %s</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Επιλογές πορτοφολιού:</translation>
</message>
@@ -2426,6 +2622,10 @@
<translation>Αδυναμία κλειδώματος του φακέλου δεδομένων %s. Πιθανώς το Bitcoin να είναι ήδη ενεργό.</translation>
</message>
<message>
+ <source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.</source>
+ <translation>Προειδοποίηση: Παρακαλώ ελέγξτε ότι η ημερομηνία και ώρα του υπολογιστή σας είναι σωστά ρυθμισμένες! Εάν το ρολόι σας είναι λάθος το Bitcoin Core δεν θα λειτουργήσει σωστά. </translation>
+ </message>
+ <message>
<source>Choose data directory on startup (default: 0)</source>
<translation>Επιλογή φακέλου δεδομένων στην εκκίνηση (προεπιλεγμένο: 0)</translation>
</message>
@@ -2442,6 +2642,10 @@
<translation>Σφάλμα φόρτωσης wallet.dat: Το Πορτοφόλι απαιτεί μια νεότερη έκδοση του Bitcoin</translation>
</message>
<message>
+ <source>Error reading from database, shutting down.</source>
+ <translation>Σφάλμα ανάγνωσης από τη βάση δεδομένων, γίνεται τερματισμός.</translation>
+ </message>
+ <message>
<source>Error: Unsupported argument -tor found, use -onion.</source>
<translation>Σφάλμα: Μη συμβατή παράμετρος -tor. Χρησιμοποιήσε την παράμετρο -onion</translation>
</message>
@@ -2450,6 +2654,10 @@
<translation>Πληροφορία</translation>
</message>
<message>
+ <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+ <translation>Η εκκίνηση ελέγχου ορθότητας απέτυχε. Γίνεται τερματισμός του Bitcoin Core.</translation>
+ </message>
+ <message>
<source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
<translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
</message>
@@ -2458,10 +2666,18 @@
<translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
</message>
<message>
+ <source>Node relay options:</source>
+ <translation>Επιλογές αναμετάδοσης κόμβου: </translation>
+ </message>
+ <message>
<source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>Ρυθμίσεις SSL: (ανατρέξτε στο Bitcoin Wiki για οδηγίες ρυθμίσεων SSL)</translation>
</message>
<message>
+ <source>RPC server options:</source>
+ <translation>Επιλογές διακομιστή RPC:</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log</translation>
</message>
@@ -2474,6 +2690,10 @@
<translation>Όρισε γλώσσα, για παράδειγμα "de_DE"(προεπιλογή:τοπικές ρυθμίσεις)</translation>
</message>
<message>
+ <source>Show all debugging options (usage: --help -help-debug)</source>
+ <translation>Προβολή όλων των επιλογών εντοπισμού σφαλμάτων (χρήση: --help -help-debug)</translation>
+ </message>
+ <message>
<source>Show splash screen on startup (default: 1)</source>
<translation>Εμφάνισε την οθόνη εκκίνησης κατά την εκκίνηση(προεπιλογή:1)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index fbfac8fc10..007acbc495 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -949,11 +949,7 @@
<source>Your current total balance</source>
<translation>via aktuala totala saldo</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesinkronigita</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 2e1b7dd278..17ec4dca5d 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1175,10 +1175,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Saldo total en las direcciones watch-only</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index c3690480d8..f50aa49110 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -582,11 +582,7 @@
<source>Total:</source>
<translation>Total:</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index c5b1e41886..d2cdf87a0e 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -953,11 +953,7 @@
<source>Your current total balance</source>
<translation>Su balance actual total</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 4a502f1a54..29a45960c9 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -755,11 +755,7 @@
<source>Recent transactions</source>
<translation>Hiljutised tehingud</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>sünkimata</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 25d437668f..33f43f0c2d 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -757,11 +757,7 @@
<source>Your current total balance</source>
<translation>تراز کل فعلی شما</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ناهمگام</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 2dde67d3d5..da95f10474 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -390,11 +390,7 @@
<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>اطلاعات نمایش داده شده ممکن است روزآمد نباشد. wallet شما به صورت خودکار بعد از برقراری اتصال با شبکه bitcoin به روز می شود اما این فرایند هنوز تکمیل نشده است.</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>خارج از روزآمد سازی</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 0ca66e8b26..db59ea1751 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nykyinen tase seurantaosoitetteissa</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Ei ajan tasalla</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index fe4288467b..67d920fd5e 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1207,10 +1207,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Solde total actuel dans des adresses juste-regarder</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>désynchronisé</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3273,6 +3269,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
<translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Reconstruire au démarrage l'index de la chaîne de blocs à partir des fichiers blk000??.dat actuels</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Envoyer les informations de débogage/trace à la console au lieu du fichier debug.log</translation>
</message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 93ece390d1..2473260c84 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -869,11 +869,7 @@
<source>Your current total balance</source>
<translation>O teu balance actual total</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non sincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 0a4b2f7847..66dd05fca7 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1073,10 +1073,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>המאזן הכולל הנוכחי בכתובות לצפייה בלבד</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>לא בסנכרון</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 0d9a57d3b4..c84d2c4e87 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1001,11 +1001,7 @@
<source>Recent transactions</source>
<translation>A legutóbbi tranzakciók</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Nincs szinkronban.</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 7bc7ed4607..dec30dafb3 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1005,11 +1005,7 @@
<source>Your current total balance</source>
<translation>Jumlah saldo Anda sekarang</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>tidak tersinkron</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 6b52362b8a..c81f458e39 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1208,10 +1208,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Current total balance in watch-only addresses</source>
<translation>Saldo corrente totale negli indirizzi di sola lettura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non sincronizzato</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index d46d748ef2..376d36bed0 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>監視限定アドレス内の現在の全残高</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>同期していない</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3286,6 +3282,10 @@ rpcpassword=%s
<translation>&lt;n&gt;個のネットワークメッセージごとにひとつをランダムに改変する</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>起動時に現在の blk000??.dat ファイルからブロック チェーンのインデックスを再構築</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 0b96a18d18..b9e118a620 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -981,11 +981,7 @@
<source>Your current total balance</source>
<translation>თქვენი სრული მიმდინარე ბალანსი</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>არ არის სინქრონიზებული</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index d9ce8ea1be..42eb9eedbb 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1025,11 +1025,7 @@
<source>Your current balance in watch-only addresses</source>
<translation>모니터링 지갑의 현재 잔액</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>동기화 필요</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index 7d4511b57d..8edee19c70 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -149,11 +149,7 @@
</context>
<context>
<name>OverviewPage</name>
- <message>
- <source>out of sync</source>
- <translation>синхрондоштурулган эмес</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 8f03a20cf6..3e25cf95b6 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -601,11 +601,7 @@
<source>Mined balance that has not yet matured</source>
<translation>Fossum pendendum quod nondum maturum est</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non synchronizato</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index b96afbbcc9..01fa94bab3 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -737,11 +737,7 @@
<source>Your current total balance</source>
<translation>Jūsų balansas</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesinchronizuota</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index a46ab83c6b..25f92b6642 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -933,11 +933,7 @@
<source>Your current total balance</source>
<translation>Jūsu kopējā tekošā bilance</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nav sinhronizēts</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index eddc61e56a..6e2b4e9fcc 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nåværende totale balanse i kun observerbare adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ute av synk</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3285,6 +3281,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slumpvis bland 1 av hver &lt;n&gt; nettverksmeldinger</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Gjenopprett blokkjedeindeks fra gjeldende blk000??.dat filer ved oppstart</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Send spor-/feilsøkingsinformasjon til konsollen istedenfor filen debug.log</translation>
</message>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index c953c35404..385972845a 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1207,10 +1207,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Huidige balans in alleen-bekijkbare adressen.</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>niet gesynchroniseerd</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 503528f4a7..54c30dfb6f 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -593,11 +593,7 @@
<source>Your current total balance</source>
<translation>Ing kekang kasalungsungan kabuuang balanse</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ali ya maka-sync</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index aece2bfa1e..db49e20cf1 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1097,10 +1097,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Łączna kwota na podglądanych adresach</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nie zsynchronizowany</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 89467bae43..42a781de99 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -63,7 +63,7 @@
</message>
<message>
<source>Receiving addresses</source>
- <translation>Endereços para receber</translation>
+ <translation>Endereços de recebimento</translation>
</message>
<message>
<source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
@@ -224,7 +224,7 @@
<name>BitcoinGUI</name>
<message>
<source>Sign &amp;message...</source>
- <translation>&amp;Assinar Mensagem...</translation>
+ <translation>&amp;Assinar mensagem...</translation>
</message>
<message>
<source>Synchronizing with network...</source>
@@ -284,11 +284,11 @@
</message>
<message>
<source>&amp;Sending addresses...</source>
- <translation>Enviando endereço&amp;s...</translation>
+ <translation>Endereço&amp;s de envio...</translation>
</message>
<message>
<source>&amp;Receiving addresses...</source>
- <translation>&amp;Receber endereços...</translation>
+ <translation>Endereços de &amp;Recebimento...</translation>
</message>
<message>
<source>Open &amp;URI...</source>
@@ -380,7 +380,7 @@
</message>
<message>
<source>&amp;Help</source>
- <translation>&amp;Ajuda</translation>
+ <translation>A&amp;juda</translation>
</message>
<message>
<source>Tabs toolbar</source>
@@ -1211,10 +1211,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanço total em endereços monitorados</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -1392,7 +1388,7 @@
</message>
<message>
<source>Debug window</source>
- <translation>Janela de debug</translation>
+ <translation>Janela de depuração</translation>
</message>
<message>
<source>General</source>
@@ -2125,7 +2121,7 @@
</message>
<message>
<source>&amp;Sign Message</source>
- <translation>&amp;Assinar Mensagem</translation>
+ <translation>&amp;Assinar mensagem</translation>
</message>
<message>
<source>The Bitcoin address to sign the message with</source>
@@ -2165,7 +2161,7 @@
</message>
<message>
<source>Sign &amp;Message</source>
- <translation>Assinar &amp;Mensagem</translation>
+ <translation>Assinar &amp;mensagem</translation>
</message>
<message>
<source>Reset all sign message fields</source>
@@ -2177,7 +2173,7 @@
</message>
<message>
<source>&amp;Verify Message</source>
- <translation>&amp;Verificar Mensagem</translation>
+ <translation>&amp;Verificar mensagem</translation>
</message>
<message>
<source>The Bitcoin address the message was signed with</source>
@@ -2189,7 +2185,7 @@
</message>
<message>
<source>Verify &amp;Message</source>
- <translation>Verificar &amp;Mensagem</translation>
+ <translation>Verificar &amp;mensagem</translation>
</message>
<message>
<source>Reset all verify message fields</source>
@@ -2197,7 +2193,7 @@
</message>
<message>
<source>Click "Sign Message" to generate signature</source>
- <translation>Clique em "Assinar Mensagem" para gerar a assinatura</translation>
+ <translation>Clique em "Assinar mensagem" para gerar a assinatura</translation>
</message>
<message>
<source>The entered address is invalid.</source>
@@ -2850,7 +2846,7 @@
</message>
<message>
<source>Debugging/Testing options:</source>
- <translation>Opções de Debug/Teste:</translation>
+ <translation>Opções de depuração/teste:</translation>
</message>
<message>
<source>Do not load the wallet and disable wallet RPC calls</source>
@@ -2890,7 +2886,7 @@
</message>
<message>
<source>If &lt;category&gt; is not supplied, output all debugging information.</source>
- <translation>Se &lt;category&gt; não for informada, logar toda informação de debug.</translation>
+ <translation>Se &lt;category&gt; não for informada, registrar toda informação de depuração.</translation>
</message>
<message>
<source>Importing...</source>
@@ -3118,7 +3114,7 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
</message>
<message>
<source>Show all debugging options (usage: --help -help-debug)</source>
- <translation>Exibir todas opções de debug (uso: --help -help-debug)</translation>
+ <translation>Exibir todas opções de depuração (uso: --help -help-debug)</translation>
</message>
<message>
<source>Show splash screen on startup (default: 1)</source>
@@ -3246,7 +3242,7 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
</message>
<message>
<source>Include IP addresses in debug output (default: %u)</source>
- <translation>Incluir endereço IP na saída de debug (padrão: %u)</translation>
+ <translation>Incluir endereço IP na saída de depuração (padrão: %u)</translation>
</message>
<message>
<source>Invalid -proxy address: '%s'</source>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 30ac9fdf31..5012ff8d83 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1138,10 +1138,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Saldo disponivél em enderços modo-verificação</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 8b029eeca1..11a29e86c9 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -168,6 +168,10 @@
<translation>Sigur doriţi să criptaţi portofelul dvs.?</translation>
</message>
<message>
+ <source>Bitcoin Core will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>Bitcoin se va închide acum pentru a termina procesul de criptare. Ţineţi minte că criptarea portofelului nu vă poate proteja în totalitate de furtul monedelor de către programe dăunătoare care vă infectează calculatorul.</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>IMPORTANT: Orice copie de siguranţă făcută anterior portofelului dumneavoastră ar trebui înlocuită cu cea generată cel mai recent, fişier criptat al portofelului. Pentru siguranţă, copiile de siguranţă vechi ale portofelului ne-criptat vor deveni inutile imediat ce veţi începe folosirea noului fişier criptat al portofelului.</translation>
</message>
@@ -184,6 +188,10 @@
<translation>Introduceţi noua parolă a portofelului electronic.&lt;br/&gt;Vă rugăm să folosiţi o parolă de&lt;b&gt;minimum 10 caractere aleatoare&lt;/b&gt;, sau &lt;b&gt;minimum 8 cuvinte&lt;/b&gt;.</translation>
</message>
<message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduceţi vechea şi noua parolă pentru portofel.</translation>
+ </message>
+ <message>
<source>Wallet encryption failed</source>
<translation>Criptarea portofelului nu a reuşit</translation>
</message>
@@ -391,6 +399,10 @@
<translation>&amp;Despre Nucleul Bitcoin</translation>
</message>
<message>
+ <source>Modify configuration options for Bitcoin Core</source>
+ <translation>Modifică opţiunile de configurare pentru Bitcoin</translation>
+ </message>
+ <message>
<source>Show the list of used sending addresses and labels</source>
<translation>Arată lista de adrese trimise şi etichetele folosite.</translation>
</message>
@@ -419,6 +431,10 @@
<translation>Nici o sursă de bloc disponibilă...</translation>
</message>
<message numerus="yes">
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>S-a procesat %n bloc din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n blocuri din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n de blocuri din istoricul tranzacţiilor.</numerusform></translation>
+ </message>
+ <message numerus="yes">
<source>%n hour(s)</source>
<translation><numerusform>%n oră</numerusform><numerusform>%n ore</numerusform><numerusform>%n ore</numerusform></translation>
</message>
@@ -471,6 +487,36 @@
<translation>Se actualizează...</translation>
</message>
<message>
+ <source>Date: %1
+</source>
+ <translation>Data: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Sumă: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tip: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Etichetă: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Adresă: %1
+</translation>
+ </message>
+ <message>
<source>Sent transaction</source>
<translation>Tranzacţie expediată</translation>
</message>
@@ -665,6 +711,18 @@
<translation>nimic</translation>
</message>
<message>
+ <source>This label turns red if the transaction size is greater than 1000 bytes.</source>
+ <translation>Această etichetă devine roşie în cazul în care dimensiunea tranzacţiei este mai mare de 1000 de octeţi.</translation>
+ </message>
+ <message>
+ <source>This label turns red if the priority is smaller than "medium".</source>
+ <translation>Această etichetă devine roşie dacă prioritatea e mai mică decît "medie".</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than %1.</source>
+ <translation>Această etichetă devine roşie, dacă orice beneficiar primeşte o sumă mai mică decât %1.</translation>
+ </message>
+ <message>
<source>Can vary +/- %1 satoshi(s) per input.</source>
<translation>Poate varia +/- %1 satoshi pentru fiecare intrare.</translation>
</message>
@@ -907,6 +965,14 @@
<translation>Adresa IP a serverului proxy (de exemplu: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
</message>
<message>
+ <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source>
+ <translation>Minimizează fereastra în locul părăsirii programului în momentul închiderii ferestrei. Cînd acestă opţiune e activă, aplicaţia se va opri doar în momentul selectării comenzii 'Închide aplicaţia' din menu.</translation>
+ </message>
+ <message>
+ <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin Core.</source>
+ <translation>Limba interfeţei utilizatorului poate fi setată aici. Această setare va avea efect după repornirea Nucleului Bitcoin.</translation>
+ </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>URL-uri terţe părţi (de exemplu, un explorator de bloc), care apar în tab-ul tranzacţiilor ca elemente de meniu contextual. %s în URL este înlocuit cu hash de tranzacţie. URL-urile multiple sînt separate prin bară verticală |.</translation>
</message>
@@ -931,6 +997,10 @@
<translation>Reţea</translation>
</message>
<message>
+ <source>&amp;Start Bitcoin Core on system login</source>
+ <translation>Porneşte Nucleul Bitcoin la pornirea sistemului</translation>
+ </message>
+ <message>
<source>(0 = auto, &lt;0 = leave that many cores free)</source>
<translation>(0 = automat, &lt;0 = lasă atîtea nuclee libere)</translation>
</message>
@@ -1043,6 +1113,10 @@
<translation>Este necesară repornirea clientului pentru a activa schimbările.</translation>
</message>
<message>
+ <source>Client will be shut down. Do you want to proceed?</source>
+ <translation>Clientul va fi închis. Doriţi să continuaţi?</translation>
+ </message>
+ <message>
<source>This change would require a client restart.</source>
<translation>Această schimbare necesită o repornire a clientului.</translation>
</message>
@@ -1125,10 +1199,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Soldul dvs. total în adresele doar-supraveghere</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesincronizat</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -1169,6 +1239,10 @@
<translation>URL-ul cererii de plată preluat nu este valid: %1</translation>
</message>
<message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI nu poate fi analizat! Acest lucru poate fi cauzat de o adresă Bitcoin nevalidă sau parametri URI deformaţi.</translation>
+ </message>
+ <message>
<source>Payment request file handling</source>
<translation>Manipulare fişier cerere de plată</translation>
</message>
@@ -1177,10 +1251,18 @@
<translation>Fişierul cerere de plată nu poate fi citit! Cauza poate fi un fişier cerere de plată nevalid.</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <translation>Cererea de plată a expirat.</translation>
+ </message>
+ <message>
<source>Unverified payment requests to custom payment scripts are unsupported.</source>
<translation>Cererile de plată neverificate prin script-uri personalizate de plată nu sînt suportate.</translation>
</message>
<message>
+ <source>Invalid payment request.</source>
+ <translation>Cerere de plată nevalidă.</translation>
+ </message>
+ <message>
<source>Refund from %1</source>
<translation>Rambursare de la %1</translation>
</message>
@@ -1441,6 +1523,10 @@
<translation>Curăţă consola</translation>
</message>
<message>
+ <source>Welcome to the Bitcoin Core RPC console.</source>
+ <translation>Bun venit la consola Nucleului Bitcoin RPC.</translation>
+ </message>
+ <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Folosiţi săgetile sus şi jos pentru a naviga în istoric şi &lt;b&gt;Ctrl-L&lt;/b&gt; pentru a curăţa.</translation>
</message>
@@ -1729,6 +1815,10 @@
<translation>per kilooctet</translation>
</message>
<message>
+ <source>Hide</source>
+ <translation>Ascunde</translation>
+ </message>
+ <message>
<source>total at least</source>
<translation>total cel puţin</translation>
</message>
@@ -1857,10 +1947,18 @@
<translation>Tranzacţia a fost respinsă! Acest lucru se poate întîmpla dacă o parte din monedele tale din portofel au fost deja cheltuite, la fel ca şi cum aţi fi folosit o copie a wallet.dat şi monedele au fost cheltuite în copie, dar nu au fost marcate ca şi cheltuite şi aici.</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <translation>Cererea de plată a expirat.</translation>
+ </message>
+ <message>
<source>Pay only the minimum fee of %1</source>
<translation>Plăteşte doar taxa minimă de %1</translation>
</message>
<message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Adresa destinatarului nu este validă, vă rugăm să o verificaţi.</translation>
+ </message>
+ <message>
<source>Warning: Invalid Bitcoin address</source>
<translation>Atenţie: Adresa bitcoin nevalidă!</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 30d44b090f..c208b3e25e 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1105,10 +1105,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Текущий общий баланс на адресах наблюдения</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>не синхронизировано</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index 294eca4127..8e7d38be00 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1081,11 +1081,7 @@
<source>Recent transactions</source>
<translation>Nedávne transakcie</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesynchronizované</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 7a283bcca1..abbdba3760 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -929,11 +929,7 @@
<source>Your current total balance</source>
<translation>Vaše trenutno skupno stanje</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>iz sinhronizacije</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 8a46ae8470..289074f134 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1212,10 +1212,6 @@ Var vänlig och försök igen.</translation>
<source>Current total balance in watch-only addresses</source>
<translation>Nuvarande total balans i granska-bara adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>osynkroniserad</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3270,6 +3266,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slupmässigt brus 1 gång varje &lt;n&gt; nätverksmeddelande</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer under uppstarten</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Skicka trace-/debuginformation till terminalen istället för till debug.log</translation>
</message>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index ff398c5d2a..bf6f3f2791 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Sadece izlenen adreslerdeki güncel toplam bakiye</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>eşleşme dışı</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3101,6 +3097,10 @@
<translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
</message>
<message>
+ <source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
+ <translation>Her vekil bağlantısı için kimlik verilerini rastgele yap. Bu, Tor akış izolasyonunu etkinleştirir (varsayılan: %u)</translation>
+ </message>
+ <message>
<source>Require high priority for relaying free or low-fee transactions (default: %u)</source>
<translation>Ücretsiz ya da düşük ücretli muamelelerin geçişi için yüksek öncelik iste (varsayılan: %u)</translation>
</message>
@@ -3277,6 +3277,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Her &lt;n&gt; şebeke mesajından rastgele birini bulanıklaştır</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Başlangıçta blok zinciri indeksini güncel blk000??.dat dosyalarından tekrar inşa et</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>
</message>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index b2e67e296e..92e0cc75c4 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -440,7 +440,7 @@
</message>
<message>
<source>%1 behind</source>
- <translation>%1 позаду</translation>
+ <translation>%1 тому</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
@@ -1123,7 +1123,7 @@
</message>
<message>
<source>Recent transactions</source>
- <translation>Недавні транзакції</translation>
+ <translation>Останні транзакції</translation>
</message>
<message>
<source>Unconfirmed transactions to watch-only addresses</source>
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Поточний сукупний баланс в адресах для спостереження</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>не синхронізовано</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 4c9f287e95..3bcce1faab 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>观察地址(watch-only address)中的当前总余额 </translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>数据同步中</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2018,6 +2014,10 @@
<source>Payment request expired.</source>
<translation>支付请求已过期。</translation>
</message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>预计 %n 个数据块后被确认。</numerusform></translation>
+ </message>
<message>
<source>Pay only the minimum fee of %1</source>
<translation>只支付最小费用 %1</translation>
@@ -2208,6 +2208,10 @@
<translation>验证消息(&amp;V)</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>请在下面输入接收者地址、消息(确保换行符、空格符、制表符等完全相同)和签名以验证消息。请仔细核对签名信息,以提防中间人攻击。请注意,这只是证明接收方签名的地址,它不能证明任何交易!</translation>
+ </message>
+ <message>
<source>The Bitcoin address the message was signed with</source>
<translation>消息使用的签名地址</translation>
</message>
@@ -2811,6 +2815,10 @@
<translation>绑定指定的IP地址开始监听。IPv6地址请使用[host]:port 格式</translation>
</message>
<message>
+ <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default: %u)</source>
+ <translation>自由交易不断的速率限制为&lt;n&gt;*1000 字节每分钟(默认值: %u)</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>删除钱包的所有交易记录,且只有用 -rescan参数启动客户端才能重新取回交易记录 </translation>
</message>
@@ -3267,6 +3275,10 @@ rpcpassword=%s
<translation>随机每1个模拟测试&lt;n&gt;网络信息</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>启动时重新为当前的 blk000??.dat 文件建立索引</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>跟踪/调试信息输出到控制台,不输出到 debug.log 文件</translation>
</message>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 254b33d5a4..3792a76095 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>所有只能看位址的目前全部餘額</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>還沒同步</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index a422ff9a71..2e33b9adf8 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -121,6 +121,12 @@ OverviewPage::OverviewPage(QWidget *parent) :
{
ui->setupUi(this);
+ // use a SingleColorIcon for the "out of sync warning" icon
+ QIcon icon = SingleColorIcon(":/icons/warning");
+ icon.addPixmap(icon.pixmap(QSize(64,64), QIcon::Normal), QIcon::Disabled); // also set the disabled icon because we are using a disabled QPushButton to work around missing HiDPI support of QLabel (https://bugreports.qt.io/browse/QTBUG-42503)
+ ui->labelTransactionsStatus->setIcon(icon);
+ ui->labelWalletStatus->setIcon(icon);
+
// Recent transactions
ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
diff --git a/src/qt/res/bitcoin-qt-res.rc b/src/qt/res/bitcoin-qt-res.rc
index c0f3e2fb39..9f66d0af79 100644
--- a/src/qt/res/bitcoin-qt-res.rc
+++ b/src/qt/res/bitcoin-qt-res.rc
@@ -19,7 +19,7 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoin Core (OSS GUI client for Bitcoin)"
+ VALUE "FileDescription", "Bitcoin Core (GUI node for Bitcoin)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-qt"
VALUE "LegalCopyright", COPYRIGHT_STR
diff --git a/src/qt/scicon.cpp b/src/qt/scicon.cpp
index b2f2399b24..c493b5569e 100644
--- a/src/qt/scicon.cpp
+++ b/src/qt/scicon.cpp
@@ -11,7 +11,9 @@
#include <QPalette>
#include <QPixmap>
-static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
+namespace {
+
+void MakeSingleColorImage(QImage& img, const QColor& colorbase)
{
img = img.convertToFormat(QImage::Format_ARGB32);
for (int x = img.width(); x--; )
@@ -24,6 +26,8 @@ static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
}
}
+}
+
QImage SingleColorImage(const QString& filename, const QColor& colorbase)
{
QImage img(filename);
diff --git a/src/rest.cpp b/src/rest.cpp
index 1b7954bbf6..7c238d506d 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -19,7 +19,7 @@
using namespace std;
using namespace json_spirit;
-static const int MAX_GETUTXOS_OUTPOINTS = 100; //allow a max of 100 outpoints to be queried at once
+static const int MAX_GETUTXOS_OUTPOINTS = 15; //allow a max of 15 outpoints to be queried at once
enum RetFormat {
RF_UNDEF,
@@ -262,12 +262,12 @@ static bool rest_chaininfo(AcceptedConnection* conn,
{
vector<string> params;
const RetFormat rf = ParseDataFormat(params, strURIPart);
-
+
switch (rf) {
case RF_JSON: {
Array rpcParams;
Value chainInfoObject = getblockchaininfo(rpcParams, false);
-
+
string strJSON = write_string(chainInfoObject, false) + "\n";
conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
return true;
@@ -276,7 +276,7 @@ static bool rest_chaininfo(AcceptedConnection* conn,
throw RESTERR(HTTP_NOT_FOUND, "output format not found (available: json)");
}
}
-
+
// not reached
return true; // continue to process further HTTP reqs on this cxn
}
@@ -342,18 +342,53 @@ static bool rest_getutxos(AcceptedConnection* conn,
vector<string> params;
enum RetFormat rf = ParseDataFormat(params, strURIPart);
+ vector<string> uriParts;
+ if (params.size() > 0 && params[0].length() > 1)
+ {
+ std::string strUriParams = params[0].substr(1);
+ boost::split(uriParts, strUriParams, boost::is_any_of("/"));
+ }
+
// throw exception in case of a empty request
- if (strRequest.length() == 0)
+ if (strRequest.length() == 0 && uriParts.size() == 0)
throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
+ bool fInputParsed = false;
bool fCheckMemPool = false;
vector<COutPoint> vOutPoints;
// parse/deserialize input
// input-format = output-format, rest/getutxos/bin requires binary input, gives binary output, ...
-
+
+ if (uriParts.size() > 0)
+ {
+
+ //inputs is sent over URI scheme (/rest/getutxos/checkmempool/txid1-n/txid2-n/...)
+ if (uriParts.size() > 0 && uriParts[0] == "checkmempool")
+ fCheckMemPool = true;
+
+ for (size_t i = (fCheckMemPool) ? 1 : 0; i < uriParts.size(); i++)
+ {
+ uint256 txid;
+ int32_t nOutput;
+ std::string strTxid = uriParts[i].substr(0, uriParts[i].find("-"));
+ std::string strOutput = uriParts[i].substr(uriParts[i].find("-")+1);
+
+ if (!ParseInt32(strOutput, &nOutput) || !IsHex(strTxid))
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
+
+ txid.SetHex(strTxid);
+ vOutPoints.push_back(COutPoint(txid, (uint32_t)nOutput));
+ }
+
+ if (vOutPoints.size() > 0)
+ fInputParsed = true;
+ else
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
+ }
+
string strRequestMutable = strRequest; //convert const string to string for allowing hex to bin converting
-
+
switch (rf) {
case RF_HEX: {
// convert hex to bin, continue then with bin part
@@ -363,11 +398,17 @@ static bool rest_getutxos(AcceptedConnection* conn,
case RF_BINARY: {
try {
- //deserialize
- CDataStream oss(SER_NETWORK, PROTOCOL_VERSION);
- oss << strRequestMutable;
- oss >> fCheckMemPool;
- oss >> vOutPoints;
+ //deserialize only if user sent a request
+ if (strRequestMutable.size() > 0)
+ {
+ if (fInputParsed) //don't allow sending input over URI and HTTP RAW DATA
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Combination of URI scheme inputs and raw post data is not allowed");
+
+ CDataStream oss(SER_NETWORK, PROTOCOL_VERSION);
+ oss << strRequestMutable;
+ oss >> fCheckMemPool;
+ oss >> vOutPoints;
+ }
} catch (const std::ios_base::failure& e) {
// abort in case of unreadable binary data
throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
@@ -376,33 +417,8 @@ static bool rest_getutxos(AcceptedConnection* conn,
}
case RF_JSON: {
- try {
- // parse json request
- Value valRequest;
- if (!read_string(strRequest, valRequest))
- throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
-
- Object jsonObject = valRequest.get_obj();
- const Value& checkMempoolValue = find_value(jsonObject, "checkmempool");
-
- if (!checkMempoolValue.is_null()) {
- fCheckMemPool = checkMempoolValue.get_bool();
- }
- const Value& outpointsValue = find_value(jsonObject, "outpoints");
- if (!outpointsValue.is_null()) {
- Array outPoints = outpointsValue.get_array();
- BOOST_FOREACH (const Value& outPoint, outPoints) {
- Object outpointObject = outPoint.get_obj();
- uint256 txid = ParseHashO(outpointObject, "txid");
- Value nValue = find_value(outpointObject, "n");
- int nOutput = nValue.get_int();
- vOutPoints.push_back(COutPoint(txid, nOutput));
- }
- }
- } catch (...) {
- // return HTTP 500 if there was a json parsing error
- throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
- }
+ if (!fInputParsed)
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
break;
}
default: {
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 4315c5ec18..79528db2fe 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -4,7 +4,9 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "checkpoints.h"
+#include "consensus/validation.h"
#include "main.h"
+#include "primitives/transaction.h"
#include "rpcserver.h"
#include "sync.h"
#include "util.h"
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index a6a8b9422f..d58d438573 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -6,6 +6,7 @@
#include "amount.h"
#include "chainparams.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
#include "main.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index e84d2693a2..3e37b797e8 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -4,13 +4,14 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
-#include "primitives/transaction.h"
+#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
#include "keystore.h"
#include "main.h"
#include "merkleblock.h"
#include "net.h"
+#include "primitives/transaction.h"
#include "rpcserver.h"
#include "script/script.h"
#include "script/script_error.h"
diff --git a/src/scheduler.cpp b/src/scheduler.cpp
index 4f1d8be7c0..c42eb7244d 100644
--- a/src/scheduler.cpp
+++ b/src/scheduler.cpp
@@ -29,8 +29,6 @@ void CScheduler::serviceQueue()
{
boost::unique_lock<boost::mutex> lock(newTaskMutex);
++nThreadsServicingQueue;
- stopRequested = false;
- stopWhenEmpty = false;
// newTaskMutex is locked throughout this loop EXCEPT
// when the thread is waiting or when the user's function
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index 6b6df5199a..22cb475e02 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -7,10 +7,12 @@
//
#include "alert.h"
+#include "chain.h"
+#include "chainparams.h"
#include "clientversion.h"
#include "data/alertTests.raw.h"
-#include "chainparams.h"
+#include "main.h"
#include "serialize.h"
#include "streams.h"
#include "util.h"
@@ -193,4 +195,65 @@ BOOST_AUTO_TEST_CASE(AlertNotify)
SetMockTime(0);
}
+static bool falseFunc() { return false; }
+
+BOOST_AUTO_TEST_CASE(PartitionAlert)
+{
+ // Test PartitionCheck
+ CCriticalSection csDummy;
+ CChain chainDummy;
+ CBlockIndex indexDummy[100];
+ CChainParams& params = Params(CBaseChainParams::MAIN);
+ int64_t nPowTargetSpacing = params.GetConsensus().nPowTargetSpacing;
+
+ // Generate fake blockchain timestamps relative to
+ // an arbitrary time:
+ int64_t now = 1427379054;
+ SetMockTime(now);
+ for (int i = 0; i < 100; i++)
+ {
+ indexDummy[i].phashBlock = NULL;
+ if (i == 0) indexDummy[i].pprev = NULL;
+ else indexDummy[i].pprev = &indexDummy[i-1];
+ indexDummy[i].nHeight = i;
+ indexDummy[i].nTime = now - (100-i)*nPowTargetSpacing;
+ // Other members don't matter, the partition check code doesn't
+ // use them
+ }
+ chainDummy.SetTip(&indexDummy[99]);
+
+ // Test 1: chain with blocks every nPowTargetSpacing seconds,
+ // as normal, no worries:
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(strMiscWarning.empty());
+
+ // Test 2: go 3.5 hours without a block, expect a warning:
+ now += 3*60*60+30*60;
+ SetMockTime(now);
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(!strMiscWarning.empty());
+ BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning);
+ strMiscWarning = "";
+
+ // Test 3: test the "partition alerts only go off once per day"
+ // code:
+ now += 60*10;
+ SetMockTime(now);
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(strMiscWarning.empty());
+
+ // Test 4: get 2.5 times as many blocks as expected:
+ now += 60*60*24; // Pretend it is a day later
+ SetMockTime(now);
+ int64_t quickSpacing = nPowTargetSpacing*2/5;
+ for (int i = 0; i < 100; i++) // Tweak chain timestamps:
+ indexDummy[i].nTime = now - (100-i)*quickSpacing;
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(!strMiscWarning.empty());
+ BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning);
+ strMiscWarning = "";
+
+ SetMockTime(0);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 7abfad151e..51530c4de5 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -2,16 +2,11 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-//
-// Unit tests for block.CheckBlock()
-//
-
-
-
#include "clientversion.h"
+#include "consensus/validation.h"
#include "main.h"
-#include "utiltime.h"
#include "test/test_bitcoin.h"
+#include "utiltime.h"
#include <cstdio>
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index 9ec533bcca..21ae46d6e9 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -2,25 +2,58 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "primitives/transaction.h"
+#include "chainparams.h"
#include "main.h"
#include "test/test_bitcoin.h"
+#include <boost/signals2/signal.hpp>
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(main_tests, TestingSetup)
+static void TestBlockSubsidyHalvings(const Consensus::Params& consensusParams)
+{
+ int maxHalvings = 64;
+ CAmount nInitialSubsidy = 50 * COIN;
+
+ CAmount nPreviousSubsidy = nInitialSubsidy * 2; // for height == 0
+ BOOST_CHECK_EQUAL(nPreviousSubsidy, nInitialSubsidy * 2);
+ for (int nHalvings = 0; nHalvings < maxHalvings; nHalvings++) {
+ int nHeight = nHalvings * consensusParams.nSubsidyHalvingInterval;
+ CAmount nSubsidy = GetBlockSubsidy(nHeight, consensusParams);
+ BOOST_CHECK(nSubsidy <= nInitialSubsidy);
+ BOOST_CHECK_EQUAL(nSubsidy, nPreviousSubsidy / 2);
+ nPreviousSubsidy = nSubsidy;
+ }
+ BOOST_CHECK_EQUAL(GetBlockSubsidy(maxHalvings * consensusParams.nSubsidyHalvingInterval, consensusParams), 0);
+}
+
+static void TestBlockSubsidyHalvings(int nSubsidyHalvingInterval)
+{
+ Consensus::Params consensusParams;
+ consensusParams.nSubsidyHalvingInterval = nSubsidyHalvingInterval;
+ TestBlockSubsidyHalvings(consensusParams);
+}
+
+BOOST_AUTO_TEST_CASE(block_subsidy_test)
+{
+ TestBlockSubsidyHalvings(Params(CBaseChainParams::MAIN).GetConsensus()); // As in main
+ TestBlockSubsidyHalvings(150); // As in regtest
+ TestBlockSubsidyHalvings(1000); // Just another interval
+}
+
BOOST_AUTO_TEST_CASE(subsidy_limit_test)
{
+ const Consensus::Params& consensusParams = Params(CBaseChainParams::MAIN).GetConsensus();
CAmount nSum = 0;
for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
- CAmount nSubsidy = GetBlockValue(nHeight, 0);
+ CAmount nSubsidy = GetBlockSubsidy(nHeight, consensusParams);
BOOST_CHECK(nSubsidy <= 50 * COIN);
nSum += nSubsidy * 1000;
BOOST_CHECK(MoneyRange(nSum));
}
- BOOST_CHECK(nSum == 2099999997690000ULL);
+ BOOST_CHECK_EQUAL(nSum, 2099999997690000ULL);
}
bool ReturnFalse() { return false; }
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index d7ea91607c..b6365b1b3a 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "consensus/validation.h"
#include "main.h"
#include "miner.h"
#include "pubkey.h"
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp
index cb357d295c..0f5e1615c6 100644
--- a/src/test/netbase_tests.cpp
+++ b/src/test/netbase_tests.cpp
@@ -117,6 +117,11 @@ BOOST_AUTO_TEST_CASE(subnet_test)
BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:8")));
BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:9")));
BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:0/112").Match(CNetAddr("1:2:3:4:5:6:7:1234")));
+ BOOST_CHECK(CSubNet("192.168.0.1/24").Match(CNetAddr("192.168.0.2")));
+ BOOST_CHECK(CSubNet("192.168.0.20/29").Match(CNetAddr("192.168.0.18")));
+ BOOST_CHECK(CSubNet("1.2.2.1/24").Match(CNetAddr("1.2.2.4")));
+ BOOST_CHECK(CSubNet("1.2.2.110/31").Match(CNetAddr("1.2.2.111")));
+ BOOST_CHECK(CSubNet("1.2.2.20/26").Match(CNetAddr("1.2.2.63")));
// All-Matching IPv6 Matches arbitrary IPv4 and IPv6
BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1:2:3:4:5:6:7:1234")));
BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1.2.3.4")));
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index afb7a41bbd..87be2217c4 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -2,15 +2,16 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "consensus/validation.h"
#include "data/sighash.json.h"
#include "main.h"
#include "random.h"
-#include "serialize.h"
-#include "script/script.h"
#include "script/interpreter.h"
+#include "script/script.h"
+#include "serialize.h"
+#include "test/test_bitcoin.h"
#include "util.h"
#include "version.h"
-#include "test/test_bitcoin.h"
#include <iostream>
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 2a3083316e..d12535e438 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -7,12 +7,13 @@
#include "test/test_bitcoin.h"
#include "clientversion.h"
+#include "consensus/validation.h"
+#include "core_io.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "script/script.h"
#include "script/script_error.h"
-#include "core_io.h"
#include <map>
#include <string>
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 071fa9d52c..1c16e2092e 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -7,6 +7,7 @@
#include "clientversion.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "main.h"
#include "policy/fees.h"
#include "streams.h"
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 3396a3a188..d892c66eda 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -9,6 +9,7 @@
#include "checkpoints.h"
#include "coincontrol.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "main.h"
#include "net.h"
#include "script/script.h"
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 13eaf95aa6..f777926e72 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -6,6 +6,7 @@
#include "wallet/walletdb.h"
#include "base58.h"
+#include "consensus/validation.h"
#include "main.h"
#include "protocol.h"
#include "serialize.h"